feat(dockerfiles): add Dockerfiles for build app (nodejs) and share builded app (nginx)

-
feat/x_gpu/new_version
TBS093A 2024-04-11 12:04:07 +02:00
parent 65eb29de9b
commit 4076ee4fdd
3 changed files with 18 additions and 18 deletions

View File

@ -1,18 +0,0 @@
# pull official base image
FROM node:13.12.0-alpine
# set working directory
WORKDIR /app
# install app dependencies
COPY package.json ./
COPY package-lock.json ./
RUN npm install --silent
RUN npm install gatsby-cli@3.10.0 --silent
ENV GATSBY_TELEMETRY_DISABLED=1
# add app
COPY . ./

11
Dockerfile.nginx 100644
View File

@ -0,0 +1,11 @@
FROM nginx:latest
WORKDIR /
RUN rm /usr/share/nginx/html/*
COPY ./public ./usr/share/nginx/html/
EXPOSE 80
CMD ["nginx", "-g", "daemon off;"]

View File

@ -0,0 +1,7 @@
FROM node:18.19.1-alpine
WORKDIR /app
COPY . ./
RUN npm install --silent