From 70788e735c3124e0c705fbb9229b03d403bf1598 Mon Sep 17 00:00:00 2001 From: Simon Warta Date: Tue, 12 Apr 2022 15:42:09 +0200 Subject: [PATCH] Use alpine:3.15 and install Node.js to reduce image size --- packages/faucet/Dockerfile | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/packages/faucet/Dockerfile b/packages/faucet/Dockerfile index f4585d78..17962f2b 100644 --- a/packages/faucet/Dockerfile +++ b/packages/faucet/Dockerfile @@ -19,7 +19,12 @@ RUN ln -sf python3 /usr/bin/python RUN yarn install && yarn run build RUN (cd packages/faucet && SKIP_BUILD=1 yarn pack-node) -FROM node:14-alpine +# Use Alpine and install Node.js which is 50% smaller than the -alpine version of the node +# image (53 MB including the faucet app). +FROM alpine:3.15 +# Installs Node.js 16 (https://pkgs.alpinelinux.org/packages?name=nodejs&branch=v3.15) +RUN apk add --update nodejs + COPY --from=build-env /app/packages/faucet /app/packages/faucet WORKDIR /app