Skip to content

Instantly share code, notes, and snippets.

@abellion
Last active July 7, 2016 16:04
Show Gist options
  • Save abellion/8d7c699b8209c257a29c819f162f6bd7 to your computer and use it in GitHub Desktop.
Save abellion/8d7c699b8209c257a29c819f162f6bd7 to your computer and use it in GitHub Desktop.
FROM ubuntu:14.04
MAINTAINER Antoine Bellion <[email protected]>
# Update system and install libs
RUN apt-get update \
&& apt-get install -y nodejs npm nodejs-legacy git
# Install http-server and bower
RUN npm install -g http-server bower
# Copy project files and moove in
COPY . /var/www/html/
WORKDIR /var/www/html/
# Install project dependencies
RUN npm install \
&& bower install --allow-root
# Build dist folder
RUN npm run build
# Launch server at port 3000 inside container and expose it outside
CMD http-server ./dist/ -p 80
EXPOSE 80
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment