mirror of
https://github.com/asimonson1125/asimonson1125.github.io.git
synced 2026-02-24 21:09:49 -06:00
try dockerfile
This commit is contained in:
24
Dockerfile
Normal file
24
Dockerfile
Normal file
@@ -0,0 +1,24 @@
|
||||
# pull official base image
|
||||
FROM node:13.12.0-alpine
|
||||
|
||||
# set working directory
|
||||
WORKDIR /app
|
||||
|
||||
# add `/app/node_modules/.bin` to $PATH
|
||||
ENV PATH /app/node_modules/.bin:$PATH
|
||||
|
||||
# install app dependencies
|
||||
COPY package.json ./
|
||||
COPY package-lock.json ./
|
||||
RUN npm install --silent
|
||||
RUN npm install react-scripts@3.4.1 -g --silent
|
||||
|
||||
RUN mkdir node_modules/.cache && chmod -R 777 node_modules/.cache
|
||||
|
||||
|
||||
# add app
|
||||
COPY . ./
|
||||
ENV PORT=8080
|
||||
|
||||
# start app
|
||||
CMD ["npm", "start"]
|
||||
Reference in New Issue
Block a user