We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 3d04110 commit eb5595bCopy full SHA for eb5595b
Dockerfile
@@ -1,15 +1,19 @@
1
-# Use Alpine and install Node.js which is 50% smaller than the -alpine version of the node
2
-# image (53 MB including the faucet app).
3
-FROM alpine:3.15 as build-env
4
-# Installs Node.js 16 (https://pkgs.alpinelinux.org/packages?name=nodejs&branch=v3.15)
+FROM node:slim as build-env
5
6
-RUN apk add --update nodejs
7
-RUN apk add --update npm
8
-RUN apk add --update ca-certificates jq bash curl
9
10
-WORKDIR /home/faucet/
+WORKDIR /faucet/
11
COPY . .
12
13
RUN npm ci
+RUN npx esbuild server.js --bundle --platform=node --outfile=index.js
+
+FROM node:slim
+WORKDIR /app/
14
15
+COPY --from=build-env /faucet/index.js /app/index.js
16
17
+CMD node /app/index.js
18
19
EXPOSE 5000
0 commit comments