updated dockerfile to use node:16-alpine, which is way lighter than the previous image

This commit is contained in:
Lou 2022-01-26 20:13:03 +01:00
commit dd8b4a67ff
2 changed files with 9 additions and 6 deletions

3
.dockerignore Normal file
View file

@ -0,0 +1,3 @@
node_modules
.git
yarn.lock

View file

@ -1,14 +1,14 @@
FROM node:16-bullseye
FROM node:16-alpine
WORKDIR /app
COPY . .
RUN rm -rf .git
COPY package.json ./
RUN yarn install
RUN yarn build
RUN yarn gatsby telemetry --disable
COPY . ./
RUN yarn build
EXPOSE 9000
CMD yarn serve -H 0.0.0.0 -p 9000
CMD [ "yarn", "serve", "-H", "0.0.0.0", "-p", "9000" ]