updated dockerfile to use node:16-alpine, which is way lighter than the previous image
This commit is contained in:
parent
e145e5b9b3
commit
dd8b4a67ff
2 changed files with 9 additions and 6 deletions
3
.dockerignore
Normal file
3
.dockerignore
Normal file
|
|
@ -0,0 +1,3 @@
|
|||
node_modules
|
||||
.git
|
||||
yarn.lock
|
||||
12
Dockerfile
12
Dockerfile
|
|
@ -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" ]
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue