You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
22 lines
516 B
22 lines
516 B
FROM node:lts-alpine
|
|
|
|
# install simple http server for serving static content
|
|
RUN npm install -g http-server
|
|
|
|
# make the 'app' folder the current working directory
|
|
WORKDIR /app
|
|
|
|
# copy both 'package.json' and 'package-lock.json' (if available)
|
|
COPY package*.json ./
|
|
|
|
# install project dependencies
|
|
RUN npm install
|
|
|
|
# copy project files and folders to the current working directory (i.e. 'app' folder)
|
|
COPY . .
|
|
|
|
# build app for production with minification
|
|
RUN npm run build
|
|
|
|
EXPOSE 8080
|
|
CMD [ "http-server", "dist" ] |