Skip to content

Commit

Permalink
Merge pull request #24 from verypossible/update-to-1.27
Browse files Browse the repository at this point in the history
Bump versions and set default to python3
  • Loading branch information
brianz authored May 19, 2018
2 parents d9b04a5 + 4f09997 commit 8606a2d
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 14 deletions.
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM python:2.7.14
FROM python:3.6.5

RUN curl -sL https://deb.nodesource.com/setup_8.x | bash -
RUN apt-get install -y \
Expand Down
4 changes: 2 additions & 2 deletions Dockerfile-python3 → Dockerfile-python2
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM python:3.6.5
FROM python:2.7.14

RUN curl -sL https://deb.nodesource.com/setup_8.x | bash -
RUN apt-get install -y \
Expand All @@ -20,7 +20,7 @@ RUN pip install \

ARG SERVERLESS_VERSION
RUN npm install -g \
serverless@${SERVERLESS_VERSION}
serverless@${SERVERLESS_VERSION}

ARG YARN_VERSION
RUN curl -o- -L https://yarnpkg.com/install.sh | bash -s -- --version ${YARN_VERSION}
Expand Down
15 changes: 8 additions & 7 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
NAME = verypossible/serverless
VERSION = 1.26.1
VERSION = 1.27.2
SERVERLESS_VERSION = $(VERSION)
YARN_VERSION = 1.5.1
YARN_VERSION = 1.6.0

.PHONY: all py2 py3 shell

Expand All @@ -10,21 +10,22 @@ all : py2 py3

py2 :
docker build \
-t $(NAME):$(VERSION) \
-t $(NAME):$(VERSION)-python2 \
-f Dockerfile-python2 \
--build-arg SERVERLESS_VERSION=$(SERVERLESS_VERSION) \
--build-arg YARN_VERSION=$(YARN_VERSION) \
.

py3 :
docker build \
-t $(NAME):$(VERSION)-python3 \
-f Dockerfile-python3 \
-t $(NAME):$(VERSION) \
-f Dockerfile \
--build-arg SERVERLESS_VERSION=$(SERVERLESS_VERSION) \
--build-arg YARN_VERSION=$(YARN_VERSION) \
.

py2-shell :
docker run --rm -it $(NAME):$(VERSION) bash
docker run --rm -it $(NAME):$(VERSION)-python2 bash

py3-shell :
docker run --rm -it $(NAME):$(VERSION)-python3 bash
docker run --rm -it $(NAME):$(VERSION) bash
8 changes: 4 additions & 4 deletions hooks/build
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,14 @@ DOCKERFILE=Dockerfile

echo "Building $CACHE_TAG using build hook!"

if [[ $CACHE_TAG == *"python3"* ]]; then
DOCKERFILE=Dockerfile-python3
if [[ $CACHE_TAG == *"python2"* ]]; then
DOCKERFILE=Dockerfile-python2
fi

echo "Using $DOCKERFILE for build"

docker build \
--build-arg SERVERLESS_VERSION=1.26.1 \
--build-arg YARN_VERSION=1.5.1 \
--build-arg SERVERLESS_VERSION=1.27.2 \
--build-arg YARN_VERSION=1.6.0 \
-f $DOCKERFILE \
-t $IMAGE_NAME .

0 comments on commit 8606a2d

Please sign in to comment.