2020-01-23 02:26:43 +01:00
|
|
|
# IMPORTANT: Don't use this Dockerfile in your own Sapper projects without also looking at the .dockerignore file.
|
|
|
|
# Without an appropriate .dockerignore, this Dockerfile will copy a large number of unneeded files into your image.
|
|
|
|
|
2019-06-07 11:05:15 +02:00
|
|
|
FROM mhart/alpine-node:12
|
2019-04-21 22:33:31 +02:00
|
|
|
|
|
|
|
# install dependencies
|
|
|
|
WORKDIR /app
|
2019-04-22 07:59:48 +02:00
|
|
|
COPY package.json package-lock.json ./
|
|
|
|
RUN npm ci --production
|
2019-04-21 22:33:31 +02:00
|
|
|
|
|
|
|
###
|
|
|
|
# Only copy over the Node pieces we need
|
|
|
|
# ~> Saves 35MB
|
|
|
|
###
|
2019-06-07 11:05:15 +02:00
|
|
|
FROM mhart/alpine-node:slim-12
|
2019-04-21 22:33:31 +02:00
|
|
|
|
|
|
|
WORKDIR /app
|
|
|
|
COPY --from=0 /app .
|
2019-04-22 07:59:48 +02:00
|
|
|
COPY . .
|
2019-04-21 22:33:31 +02:00
|
|
|
|
|
|
|
EXPOSE 3000
|
|
|
|
CMD ["node", "__sapper__/build"]
|