Skip to content

Commit 99a89db

Browse files
committed
Improve docker container
1 parent 2f8ec19 commit 99a89db

File tree

2 files changed

+5
-3
lines changed

2 files changed

+5
-3
lines changed

.dockerignore

+1
Original file line numberDiff line numberDiff line change
@@ -2,3 +2,4 @@ bower_components
22
node_modules
33
tmp/*
44
dist/*
5+
.git/*

Dockerfile

+4-3
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,18 @@
1-
FROM node:20-alpine
1+
FROM node:20-bookworm
22

33
RUN mkdir -p /opt/kitsu/client
4+
RUN npm set cache /var/cache/npm
45

56
# Preinstall dependencies in an earlier layer so we don't reinstall every time
67
# any file changes.
78
COPY ./package.json /opt/kitsu/client/
89
COPY ./package-lock.json /opt/kitsu/client/
910
WORKDIR /opt/kitsu/client
10-
RUN npm ci
11+
RUN --mount=type=cache,target=/var/cache/npm npm install
1112

1213
# *NOW* we copy the codebase in
1314
COPY . /opt/kitsu/client
1415

1516
ENTRYPOINT ["npm", "run"]
1617
CMD ["dev", "--port=80", "--strictPort"]
17-
EXPOSE 80
18+
EXPOSE 80

0 commit comments

Comments
 (0)