Create docker
This commit is contained in:
25
Dockerfile
Normal file
25
Dockerfile
Normal file
@ -0,0 +1,25 @@
|
||||
# stage 1: build node frontend
|
||||
FROM node:21 as node-builder
|
||||
|
||||
WORKDIR /node-builder
|
||||
COPY ./public ./public
|
||||
COPY ./src ./src
|
||||
COPY ./package.json .
|
||||
COPY ./package-lock.json .
|
||||
COPY ./tsconfig.json .
|
||||
|
||||
RUN \
|
||||
npm install && \
|
||||
npm run build
|
||||
|
||||
|
||||
FROM busybox:1.36-musl
|
||||
|
||||
RUN adduser -D pingator
|
||||
USER pingator
|
||||
WORKDIR /www
|
||||
|
||||
COPY --from=node-builder /node-builder/build /www
|
||||
|
||||
# Run BusyBox httpd
|
||||
CMD ["busybox", "httpd", "-f", "-v", "-h", "/www", "-p", "3000"]
|
||||
Reference in New Issue
Block a user