Hello world app

This commit is contained in:
René Preuß committed 2021-12-05 14:57:42 +01:00
1 parent 04594dc41a
commit 849425db43
4 files changed
+155 -1

No files matched your search

+21
View File
@@ -0,0 +1,21 @@
FROM node:14-alpine AS build
WORKDIR /app
COPY . /app
RUN set -ex \
# Build JS-Application
&& npm install --production \
# Delete unnecessary files
&& rm package* \
# Correct User's file access
&& chown -R node:node /app
FROM node:14-alpine AS final
WORKDIR /app
COPY --from=build /app /app
ENV HTTP_PORT=8000
EXPOSE $HTTP_PORT $HTTPS_PORT
USER 1000
EXPOSE 8000
CMD ["node", "./index.js"]