-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
36 lines (29 loc) · 795 Bytes
/
Dockerfile
File metadata and controls
36 lines (29 loc) · 795 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
# === Build:
# docker build -t myapp .
# docker run -p 3000:8000 -d myapp
# docker build --progress=plain --no-cache -t myapp .
# === Debug:
# docker run --entrypoint=sh -ti myapp
# stage 1
FROM node:16-bullseye AS base
RUN apt-get --yes update && apt-get --yes upgrade
RUN apt-get --yes install netcat-traditional
# Copy source code and install NPM dependencies
WORKDIR /base
COPY src ./
COPY package.json ./
RUN npm i
# debugging
# FROM gcr.io/distroless/nodejs:debug
# FROM gcr.io/distroless/nodejs-debian11:16
# FROM node:16-bullseye-slim
# stage 2 - switch to distroless
# FROM gcr.io/distroless/nodejs:16
# COPY --from=base /base /base
# WORKDIR /base
# chainguard?
# FROM cgr.dev/chainguard/node:latest
# COPY --from=base /base /base
# WORKDIR /base
EXPOSE 8000
CMD ["server.js"]