Created
September 27, 2019 18:31
-
-
Save shahabganji/e3828b164a8ac163bc02afd0306c53d0 to your computer and use it in GitHub Desktop.
DockerizeAurleia
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# use latest version of nodejs | |
FROM node:lts-alpine | |
# install aurelia-cli to build the app & http-server to serve static contents | |
RUN npm i -g http-server | |
RUN npm i -g aurelia-cli | |
# set working directory to app, henceforth all command will run inside this folder | |
WORKDIR /app | |
# copy package.json related files first and install all required dependencies | |
COPY package*.json ./ | |
RUN npm install | |
# copy the rest of files and folders & install dependencies | |
COPY . ./ | |
RUN npm run build | |
# by default http-server will serve contents on port 8080, so we expose this port to host machine | |
EXPOSE 8080 | |
CMD [ "http-server" , "dist" ] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment