Created
December 6, 2019 11:10
-
-
Save jinseokoh/0ca625bc8b7c226dc545c21a579c0b67 to your computer and use it in GitHub Desktop.
Dockerfile for NuxtJS Universal App
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
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