Skip to content

Instantly share code, notes, and snippets.

@shahabganji
Created September 27, 2019 18:31
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save shahabganji/e3828b164a8ac163bc02afd0306c53d0 to your computer and use it in GitHub Desktop.
Save shahabganji/e3828b164a8ac163bc02afd0306c53d0 to your computer and use it in GitHub Desktop.
DockerizeAurleia
# 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