Skip to content

Instantly share code, notes, and snippets.

@gabber12
Created December 17, 2017 13:01
Show Gist options
  • Save gabber12/b8b82a364054124d0283833cd4994de3 to your computer and use it in GitHub Desktop.
Save gabber12/b8b82a364054124d0283833cd4994de3 to your computer and use it in GitHub Desktop.
Sample Docker file for vuejs applications
# Start with node environment.
# * Download packages
# * Build application
FROM node:6 as builder
COPY . /build
WORKDIR /build
RUN npm install && npm run build
FROM nginx
# Copy the distribution files to be served by nginx
COPY --from=builder /build/dist /usr/share/nginx/html
ARG ENV
EXPOSE 80
COPY /nginx/${ENV}.conf /etc/nginx/conf.d/default.conf
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment