feat(dockerfiles): add Dockerfiles for build app (nodejs) and share builded app (nginx)
-feat/x_gpu/new_version
parent
65eb29de9b
commit
4076ee4fdd
18
Dockerfile
18
Dockerfile
|
|
@ -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 . ./
|
||||
|
|
@ -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;"]
|
||||
|
|
@ -0,0 +1,7 @@
|
|||
FROM node:18.19.1-alpine
|
||||
|
||||
WORKDIR /app
|
||||
|
||||
COPY . ./
|
||||
|
||||
RUN npm install --silent
|
||||
Loading…
Reference in New Issue