forked from travisghansen/external-auth-server
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
36 lines (26 loc) · 686 Bytes
/
Dockerfile
File metadata and controls
36 lines (26 loc) · 686 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 image
######################
FROM node:16-bullseye AS build
ENV DEBIAN_FRONTEND=noninteractive
RUN apt-get update && apt-get install -y python
RUN mkdir -p /tmp/app
WORKDIR /tmp/app
COPY package*.json ./
RUN npm install --production
COPY . .
######################
# actual image
######################
FROM node:16-bullseye-slim
ENV DEBIAN_FRONTEND=noninteractive
# Run as a non-root user
RUN useradd --create-home eas \
&& mkdir /home/eas/app \
&& chown -R eas: /home/eas
COPY --from=build --chown=eas:eas /tmp/app /home/eas/app
WORKDIR /home/eas/app
USER eas
EXPOSE 8080
ENTRYPOINT [ "npm", "run", "--silent"]
CMD [ "start" ]