mirror of
https://github.com/asimonson1125/asimonson1125.github.io.git
synced 2026-02-25 05:09:49 -06:00
25 lines
454 B
Docker
25 lines
454 B
Docker
# 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"]
|