Skip to content

Commit

Permalink
Update serverless and yarn versions
Browse files Browse the repository at this point in the history
_Why_?

Both were out of date

_How_?

fix the versions as env-vars in the make file
update both dockerfiles to accept the yarn version
install yarn from curl

_Side Effects_?

:fingers_crossed: no
  • Loading branch information
bbrock25 committed Jan 8, 2018
1 parent 5efa0e4 commit 89419dd
Showing 4 changed files with 26 additions and 15 deletions.
6 changes: 4 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -20,8 +20,10 @@ RUN pip install \

ARG SERVERLESS_VERSION
RUN npm install -g \
serverless@${SERVERLESS_VERSION} \
yarn
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
6 changes: 4 additions & 2 deletions Dockerfile-python3
Original file line number Diff line number Diff line change
@@ -20,8 +20,10 @@ RUN pip install \

ARG SERVERLESS_VERSION
RUN npm install -g \
serverless@${SERVERLESS_VERSION} \
yarn
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
10 changes: 7 additions & 3 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
NAME = verypossible/serverless
VERSION = 1.24.0
VERSION = 1.25.0
SERVERLESS_VERSION = $(VERSION)
YARN_VERSION = 1.3.2

.PHONY: all py2 py3 shell

@@ -9,14 +11,16 @@ all : py2 py3
py2 :
docker build \
-t $(NAME):$(VERSION) \
--build-arg SERVERLESS_VERSION=$(VERSION) \
--build-arg SERVERLESS_VERSION=$(SERVERLESS_VERSION) \
--build-arg YARN_VERSION=$(YARN_VERSION) \
.

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

shell :
19 changes: 11 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
@@ -2,16 +2,19 @@

Automated Docker build for the Serverless framework

There are two `Dockerfile`s which are nearly the same. One uses Python 2 base image and the other
Python 3.
There are two `Dockerfile`s which are nearly the same. One uses
Python 2 base image and the other Python 3.

These images are built in Docker Cloud. The Serverless version to build is specified as a build
`ARG` (build argument) which is set using `--build-arg` during the `docker build` command. To pass
this argument, we need a Docker Cloud build hook which resides in `hooks/build`.
These images are built in Docker Cloud. The Serverless version to
build is specified as a build `ARG` (build argument) which is set
using `--build-arg` during the `docker build` command. To pass this
argument, we need a Docker Cloud build hook which resides in
`hooks/build`.

In order to bump the Serverless version, the only real requirement is to change the version in the
`hooks/build` file. The `Makefile` also has references to the Serverless version, but this is
really for testing the build locally.
In order to bump the Serverless version, the only real requirement is
to change the version in the `hooks/build` file. The `Makefile` also
has references to the Serverless version, but this is really for
testing the build locally.

See the following for more information on Docker Cloud build hooks:

0 comments on commit 89419dd

Please sign in to comment.