File tree 4 files changed +26
-15
lines changed
4 files changed +26
-15
lines changed Original file line number Diff line number Diff line change @@ -20,8 +20,10 @@ RUN pip install \
20
20
21
21
ARG SERVERLESS_VERSION
22
22
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}
25
27
26
28
RUN echo "alias ll='ls -alFh --color=auto'" >> /root/.bashrc
27
29
RUN echo "alias l='ls -alFh --color=auto'" >> /root/.bashrc
Original file line number Diff line number Diff line change @@ -20,8 +20,10 @@ RUN pip install \
20
20
21
21
ARG SERVERLESS_VERSION
22
22
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}
25
27
26
28
RUN echo "alias ll='ls -alFh --color=auto'" >> /root/.bashrc
27
29
RUN echo "alias l='ls -alFh --color=auto'" >> /root/.bashrc
Original file line number Diff line number Diff line change 1
1
NAME = verypossible/serverless
2
- VERSION = 1.24.0
2
+ VERSION = 1.25.0
3
+ SERVERLESS_VERSION = $(VERSION )
4
+ YARN_VERSION = 1.3.2
3
5
4
6
.PHONY : all py2 py3 shell
5
7
@@ -9,14 +11,16 @@ all : py2 py3
9
11
py2 :
10
12
docker build \
11
13
-t $(NAME ) :$(VERSION ) \
12
- --build-arg SERVERLESS_VERSION=$(VERSION ) \
14
+ --build-arg SERVERLESS_VERSION=$(SERVERLESS_VERSION ) \
15
+ --build-arg YARN_VERSION=$(YARN_VERSION ) \
13
16
.
14
17
15
18
py3 :
16
19
docker build \
17
20
-t $(NAME ) :$(VERSION ) -python3 \
18
21
-f Dockerfile-python3 \
19
- --build-arg SERVERLESS_VERSION=$(VERSION ) \
22
+ --build-arg SERVERLESS_VERSION=$(SERVERLESS_VERSION ) \
23
+ --build-arg YARN_VERSION=$(YARN_VERSION ) \
20
24
.
21
25
22
26
shell :
Original file line number Diff line number Diff line change 2
2
3
3
Automated Docker build for the Serverless framework
4
4
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.
7
7
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 ` .
11
13
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.
15
18
16
19
See the following for more information on Docker Cloud build hooks:
17
20
You can’t perform that action at this time.
0 commit comments