Skip to content

Commit 0619e4e

Browse files
committed
chore: use build-arg VERSION for docker build
1 parent c93a4ac commit 0619e4e

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

Dockerfile

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
FROM node:lts-alpine
22

3+
ARG VERSION latest
4+
35
RUN npm install -g @shm-open/code-push-server@${VERSION} pm2@latest --no-optional
46

57
RUN mkdir /data/
@@ -10,4 +12,4 @@ COPY ./process.json /data/process.json
1012

1113
# CMD ["pm2-runtime", "/data/process.json"]
1214
# workaround for issue https://github.com/Unitech/pm2/issues/4950
13-
CMD ["sh", "-c", "pm2 ps && pm2-runtime /data/process.json"]
15+
CMD ["sh", "-c", "pm2 ps && pm2-runtime /data/process.json"]

Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ coverage:
1717
release-docker:
1818
@echo "\nBuilding docker image..."
1919
docker pull node:lts-alpine
20-
VERSION=${VERSION} docker build -t shmopen/code-push-server:latest --no-cache .
20+
docker build --build-arg VERSION=${VERSION} -t shmopen/code-push-server:latest --no-cache .
2121
docker tag shmopen/code-push-server:latest shmopen/code-push-server:${VERSION}
2222
docker push shmopen/code-push-server:${VERSION}
2323
docker push shmopen/code-push-server:latest

0 commit comments

Comments
 (0)