Skip to content

Commit a4c3d1f

Browse files
authored
Merge pull request #20 from verypossible/chore/bump-versions
Update serverless and yarn versions
2 parents 5efa0e4 + 89419dd commit a4c3d1f

File tree

4 files changed

+26
-15
lines changed

4 files changed

+26
-15
lines changed

Dockerfile

+4-2
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,10 @@ RUN pip install \
2020

2121
ARG SERVERLESS_VERSION
2222
RUN npm install -g \
23-
serverless@${SERVERLESS_VERSION} \
24-
yarn
23+
serverless@${SERVERLESS_VERSION}
24+
25+
ARG YARN_VERSION
26+
RUN curl -o- -L https://yarnpkg.com/install.sh | bash -s -- --version ${YARN_VERSION}
2527

2628
RUN echo "alias ll='ls -alFh --color=auto'" >> /root/.bashrc
2729
RUN echo "alias l='ls -alFh --color=auto'" >> /root/.bashrc

Dockerfile-python3

+4-2
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,10 @@ RUN pip install \
2020

2121
ARG SERVERLESS_VERSION
2222
RUN npm install -g \
23-
serverless@${SERVERLESS_VERSION} \
24-
yarn
23+
serverless@${SERVERLESS_VERSION}
24+
25+
ARG YARN_VERSION
26+
RUN curl -o- -L https://yarnpkg.com/install.sh | bash -s -- --version ${YARN_VERSION}
2527

2628
RUN echo "alias ll='ls -alFh --color=auto'" >> /root/.bashrc
2729
RUN echo "alias l='ls -alFh --color=auto'" >> /root/.bashrc

Makefile

+7-3
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
NAME = verypossible/serverless
2-
VERSION = 1.24.0
2+
VERSION = 1.25.0
3+
SERVERLESS_VERSION = $(VERSION)
4+
YARN_VERSION = 1.3.2
35

46
.PHONY: all py2 py3 shell
57

@@ -9,14 +11,16 @@ all : py2 py3
911
py2 :
1012
docker build \
1113
-t $(NAME):$(VERSION) \
12-
--build-arg SERVERLESS_VERSION=$(VERSION) \
14+
--build-arg SERVERLESS_VERSION=$(SERVERLESS_VERSION) \
15+
--build-arg YARN_VERSION=$(YARN_VERSION) \
1316
.
1417

1518
py3 :
1619
docker build \
1720
-t $(NAME):$(VERSION)-python3 \
1821
-f Dockerfile-python3 \
19-
--build-arg SERVERLESS_VERSION=$(VERSION) \
22+
--build-arg SERVERLESS_VERSION=$(SERVERLESS_VERSION) \
23+
--build-arg YARN_VERSION=$(YARN_VERSION) \
2024
.
2125

2226
shell :

README.md

+11-8
Original file line numberDiff line numberDiff line change
@@ -2,16 +2,19 @@
22

33
Automated Docker build for the Serverless framework
44

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

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

12-
In order to bump the Serverless version, the only real requirement is to change the version in the
13-
`hooks/build` file. The `Makefile` also has references to the Serverless version, but this is
14-
really for testing the build locally.
14+
In order to bump the Serverless version, the only real requirement is
15+
to change the version in the `hooks/build` file. The `Makefile` also
16+
has references to the Serverless version, but this is really for
17+
testing the build locally.
1518

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

0 commit comments

Comments
 (0)