diff --git a/Dockerfile-python2 b/Dockerfile-python2 deleted file mode 100644 index be404c2..0000000 --- a/Dockerfile-python2 +++ /dev/null @@ -1,35 +0,0 @@ -FROM python:2.7.15 - -RUN curl -sL https://deb.nodesource.com/setup_8.x | bash - -RUN apt-get install -y \ - groff \ - nodejs - -RUN mkdir /root/.aws - -RUN curl -s https://bootstrap.pypa.io/get-pip.py | python -RUN pip install \ - awscli \ - pep8 \ - pipenv \ - pytest \ - pytest-cov \ - pytest-mock \ - pytest-watch \ - boto3 - -ARG SERVERLESS_VERSION -RUN npm install -g \ - serverless@${SERVERLESS_VERSION} - -ARG YARN_VERSION -RUN curl -o- -L https://yarnpkg.com/install.sh | bash -s -- --version ${YARN_VERSION} - -RUN echo "alias ll='ls -alFh --color=auto'" >> /root/.bashrc -RUN echo "alias l='ls -alFh --color=auto'" >> /root/.bashrc - -# assuming that your serverless python libs live here -RUN echo "export PYTHONPATH=/code/serverless/lib" >> /root/.bashrc - -RUN mkdir /code -WORKDIR /code diff --git a/Makefile b/Makefile index e3d904d..e8e080e 100644 --- a/Makefile +++ b/Makefile @@ -1,19 +1,11 @@ NAME = verypossible/serverless -SERVERLESS_VERSION = 1.29.0 -YARN_VERSION = 1.6.0 +SERVERLESS_VERSION = 1.35.1 +YARN_VERSION = 1.12.3 -.PHONY: all py2 py3 shell +.PHONY: all py3 shell -all : py2 py3 - -py2 : - docker build \ - -t $(NAME):$(SERVERLESS_VERSION)-python2 \ - -f Dockerfile-python2 \ - --build-arg SERVERLESS_VERSION=$(SERVERLESS_VERSION) \ - --build-arg YARN_VERSION=$(YARN_VERSION) \ - . +all : py3 py3 : docker build \ @@ -23,8 +15,5 @@ py3 : --build-arg YARN_VERSION=$(YARN_VERSION) \ . -py2-shell : - docker run --rm -it $(NAME):$(SERVERLESS_VERSION)-python2 bash - py3-shell : docker run --rm -it $(NAME):$(SERVERLESS_VERSION) bash diff --git a/hooks/build b/hooks/build index 4eddab0..3d44057 100755 --- a/hooks/build +++ b/hooks/build @@ -3,14 +3,10 @@ DOCKERFILE=Dockerfile echo "Building $CACHE_TAG using build hook!" -if [[ $CACHE_TAG == *"python2"* ]]; then - DOCKERFILE=Dockerfile-python2 -fi - echo "Using $DOCKERFILE for build" docker build \ - --build-arg SERVERLESS_VERSION=1.29.0 \ - --build-arg YARN_VERSION=1.6.0 \ + --build-arg SERVERLESS_VERSION=1.35.1 \ + --build-arg YARN_VERSION=1.12.3 \ -f $DOCKERFILE \ -t $IMAGE_NAME .