Skip to content

Instantly share code, notes, and snippets.

@daliborgogic
Created August 30, 2019 10:18
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 daliborgogic/169400165520fe36088ed437547a48b9 to your computer and use it in GitHub Desktop.
Save daliborgogic/169400165520fe36088ed437547a48b9 to your computer and use it in GitHub Desktop.
FROM mhart/alpine-node:12.9.1
RUN npm i -g pkg
RUN which pkg
COPY package*.json /app/
RUN cd /app; npm ci \
&& npm run build \
&& /usr/bin/pkg -t node12-linux --output .dist .
COPY . /app
FROM alpine:3.9
WORKDIR /app
ENV HOST 0.0.0.0
COPY --from=0 ./app/.dist ./
RUN ls -la
EXPOSE 3000
CMD ["./dist/alpine-pkg-nuxt-linux"]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment