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
337 B
22 lines
337 B
6 years ago
|
# Pull node base image
|
||
|
FROM node:latest
|
||
|
|
||
|
ARG build_path=/var/www
|
||
|
ENV BUILD_PATH=$build_path
|
||
|
|
||
|
# Expose port 80
|
||
|
EXPOSE 80
|
||
|
|
||
|
VOLUME [ "/var/www/exported" ]
|
||
|
|
||
|
# Copy custom configuration file from the current directory
|
||
|
|
||
|
WORKDIR ${BUILD_PATH}
|
||
|
COPY . ${BUILD_PATH}
|
||
|
|
||
|
RUN npm install
|
||
|
RUN npm run build
|
||
|
|
||
|
# Start up node server
|
||
|
CMD ["npm", "start"]
|