Skip to content

Commit 46bf3cb

Browse files
authored
Reduce docker image size and fix release GitHub action (#58)
* Reduce docker image size and fix release GitHub action Signed-off-by: Nicko Guyer <[email protected]> * Remove unnecessary build dependencies Signed-off-by: Nicko Guyer <[email protected]>
1 parent cc6a3b5 commit 46bf3cb

File tree

3 files changed

+4251
-225
lines changed

3 files changed

+4251
-225
lines changed

.github/workflows/docker_release.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,8 @@ jobs:
1818
--label commit=$GITHUB_SHA \
1919
--label build_date=$(date -u +"%Y-%m-%dT%H:%M:%SZ") \
2020
--label tag=${GITHUB_REF##*/} \
21-
--tag ghcr.io/hyperledger/firefly-dataexchange-https:${GITHUB_REF##*/}" \
22-
--tag ghcr.io/hyperledger/firefly-dataexchange-https:head" \
21+
--tag ghcr.io/hyperledger/firefly-dataexchange-https:${GITHUB_REF##*/} \
22+
--tag ghcr.io/hyperledger/firefly-dataexchange-https:head \
2323
.
2424
2525
- name: Tag release

Dockerfile

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,15 @@
1-
FROM node:14-alpine3.11 as firefly-dataexchange-builder
2-
RUN apk add --update python make
1+
FROM node:16-alpine3.15 as firefly-dataexchange-builder
32
ADD . /firefly-dataexchange-https
43
WORKDIR /firefly-dataexchange-https
54
RUN npm install
65
RUN npm run build
76

8-
FROM node:14-alpine3.11
7+
FROM node:16-alpine3.15
98
WORKDIR /firefly-dataexchange-https
109
COPY --from=firefly-dataexchange-builder /firefly-dataexchange-https/package.json /firefly-dataexchange-https
1110
COPY --from=firefly-dataexchange-builder /firefly-dataexchange-https/build /firefly-dataexchange-https/build
12-
COPY --from=firefly-dataexchange-builder /firefly-dataexchange-https/node_modules /firefly-dataexchange-https/node_modules
11+
COPY --from=firefly-dataexchange-builder /firefly-dataexchange-https/package*.json ./
12+
RUN npm install --production
1313
EXPOSE 3000
1414
EXPOSE 3001
1515
CMD [ "node", "./build/index.js" ]

0 commit comments

Comments
 (0)