-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathDockerfile
More file actions
24 lines (23 loc) · 862 Bytes
/
Dockerfile
File metadata and controls
24 lines (23 loc) · 862 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
# syntax docker/dockerfile:latest
ARG nodejs_version="20.11.0"
ARG os_version="bullseye-slim"
FROM node:${nodejs_version}-${os_version} AS build
LABEL org.opencontainers.image.authors="BN Enginseers" \
org.opencontainers.image.vendor="BN Digital" \
org.opencontainers.image.title="NodeJS" \
org.opencontainers.image.url="https://github.com/bn-digital/docker" \
org.opencontainers.image.base.name="dcr.bndigital.dev/library/nodejs" \
org.opencontainers.image.source="https://github.com/bn-digital/docker" \
org.opencontainers.image.licenses="MIT"
ENV NODE_NO_WARNINGS="1" \
NODE_ENV=production \
HOST="0.0.0.0" \
PORT="5000"
WORKDIR /usr/local/src
RUN npm install --global pm2 http-server
USER node
EXPOSE $PORT
COPY --chown=node . .
ENTRYPOINT ["http-server"]
CMD ["--proxy", "http://localhost:5000?"]
FROM build