Skip to content

Commit

Permalink
Reduce docker image size and fix release GitHub action (#58)
Browse files Browse the repository at this point in the history
* Reduce docker image size and fix release GitHub action

Signed-off-by: Nicko Guyer <nicko.guyer@kaleido.io>

* Remove unnecessary build dependencies

Signed-off-by: Nicko Guyer <nicko.guyer@kaleido.io>
  • Loading branch information
nguyer committed Apr 26, 2022
1 parent cc6a3b5 commit 46bf3cb
Show file tree
Hide file tree
Showing 3 changed files with 4,251 additions and 225 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/docker_release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,8 @@ jobs:
--label commit=$GITHUB_SHA \
--label build_date=$(date -u +"%Y-%m-%dT%H:%M:%SZ") \
--label tag=${GITHUB_REF##*/} \
--tag ghcr.io/hyperledger/firefly-dataexchange-https:${GITHUB_REF##*/}" \
--tag ghcr.io/hyperledger/firefly-dataexchange-https:head" \
--tag ghcr.io/hyperledger/firefly-dataexchange-https:${GITHUB_REF##*/} \
--tag ghcr.io/hyperledger/firefly-dataexchange-https:head \
.
- name: Tag release
Expand Down
8 changes: 4 additions & 4 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
FROM node:14-alpine3.11 as firefly-dataexchange-builder
RUN apk add --update python make
FROM node:16-alpine3.15 as firefly-dataexchange-builder
ADD . /firefly-dataexchange-https
WORKDIR /firefly-dataexchange-https
RUN npm install
RUN npm run build

FROM node:14-alpine3.11
FROM node:16-alpine3.15
WORKDIR /firefly-dataexchange-https
COPY --from=firefly-dataexchange-builder /firefly-dataexchange-https/package.json /firefly-dataexchange-https
COPY --from=firefly-dataexchange-builder /firefly-dataexchange-https/build /firefly-dataexchange-https/build
COPY --from=firefly-dataexchange-builder /firefly-dataexchange-https/node_modules /firefly-dataexchange-https/node_modules
COPY --from=firefly-dataexchange-builder /firefly-dataexchange-https/package*.json ./
RUN npm install --production
EXPOSE 3000
EXPOSE 3001
CMD [ "node", "./build/index.js" ]
Loading

0 comments on commit 46bf3cb

Please sign in to comment.