Skip to content

Instantly share code, notes, and snippets.

@jinseokoh
Created December 6, 2019 11:10
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 jinseokoh/0ca625bc8b7c226dc545c21a579c0b67 to your computer and use it in GitHub Desktop.
Save jinseokoh/0ca625bc8b7c226dc545c21a579c0b67 to your computer and use it in GitHub Desktop.
Dockerfile for NuxtJS Universal App
FROM node:13.2-alpine
# create destination directory
RUN mkdir -p /usr/src/app
WORKDIR /usr/src/app
# bundle app sources
COPY . /usr/src/app/
ENV NODE_ENV=local
RUN apk add --no-cache --virtual .build-deps alpine-sdk python \
&& npm install --silent \
&& apk del .build-deps
RUN npm run build
ENV HOST 0.0.0.0
ENV PORT 3000
# expose 3000 on container
EXPOSE 3000
# start the app
CMD [ "npm", "start" ]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment