Reduce docker container size by ~100MB
All checks were successful
Build and Push Container / build (push) Successful in 1m1s
All checks were successful
Build and Push Container / build (push) Successful in 1m1s
This commit is contained in:
parent
9dfc790200
commit
040b427d97
17
Dockerfile
17
Dockerfile
@ -1,4 +1,4 @@
|
|||||||
FROM node:20-alpine
|
FROM node:20-alpine AS base
|
||||||
|
|
||||||
WORKDIR /checker
|
WORKDIR /checker
|
||||||
|
|
||||||
@ -6,12 +6,17 @@ COPY package.json ./
|
|||||||
COPY pnpm-lock.yaml ./
|
COPY pnpm-lock.yaml ./
|
||||||
COPY src ./src
|
COPY src ./src
|
||||||
|
|
||||||
LABEL org.opencontainers.image.source=https://git.pfy.ch/pfych/chapter-tracker
|
|
||||||
LABEL org.opencontainers.image.description="Ping a webhook when a new MangaDex chapter is released"
|
|
||||||
LABEL org.opencontainers.image.licenses=MIT
|
|
||||||
|
|
||||||
RUN npm install -g pnpm
|
RUN npm install -g pnpm
|
||||||
RUN pnpm install
|
RUN pnpm install
|
||||||
RUN pnpm run compile
|
RUN pnpm run compile
|
||||||
|
|
||||||
CMD ["node", "./.out/build.js"]
|
FROM node:20-alpine AS app
|
||||||
|
|
||||||
|
LABEL org.opencontainers.image.source=https://git.pfy.ch/pfych/chapter-tracker
|
||||||
|
LABEL org.opencontainers.image.description="Ping a webhook when a new MangaDex chapter is released"
|
||||||
|
LABEL org.opencontainers.image.licenses=MIT
|
||||||
|
|
||||||
|
WORKDIR /checker
|
||||||
|
COPY --from=base /checker/.out/build.js build.js
|
||||||
|
|
||||||
|
CMD ["node", "build.js"]
|
||||||
|
@ -16,15 +16,17 @@
|
|||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"packageManager": "pnpm@10.7.1",
|
"packageManager": "pnpm@10.7.1",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
|
"axios": "1.8.4",
|
||||||
|
"lodash-es": "4.17.21"
|
||||||
|
},
|
||||||
|
"devDependencies": {
|
||||||
"@types/lodash-es": "4.17.12",
|
"@types/lodash-es": "4.17.12",
|
||||||
"@types/node": "22.14.1",
|
"@types/node": "22.14.1",
|
||||||
"axios": "1.8.4",
|
|
||||||
"esbuild": "0.25.2",
|
"esbuild": "0.25.2",
|
||||||
"@typescript-eslint/eslint-plugin": "7.2.0",
|
"@typescript-eslint/eslint-plugin": "7.2.0",
|
||||||
"@typescript-eslint/parser": "7.2.0",
|
"@typescript-eslint/parser": "7.2.0",
|
||||||
"eslint": "8.57.0",
|
"eslint": "8.57.0",
|
||||||
"eslint-config-prettier": "9.1.0",
|
"eslint-config-prettier": "9.1.0",
|
||||||
"lodash-es": "4.17.21",
|
|
||||||
"prettier": "3.5.3",
|
"prettier": "3.5.3",
|
||||||
"typescript": "5.8.3"
|
"typescript": "5.8.3"
|
||||||
},
|
},
|
||||||
|
@ -8,6 +8,13 @@ importers:
|
|||||||
|
|
||||||
.:
|
.:
|
||||||
dependencies:
|
dependencies:
|
||||||
|
axios:
|
||||||
|
specifier: 1.8.4
|
||||||
|
version: 1.8.4
|
||||||
|
lodash-es:
|
||||||
|
specifier: 4.17.21
|
||||||
|
version: 4.17.21
|
||||||
|
devDependencies:
|
||||||
'@types/lodash-es':
|
'@types/lodash-es':
|
||||||
specifier: 4.17.12
|
specifier: 4.17.12
|
||||||
version: 4.17.12
|
version: 4.17.12
|
||||||
@ -20,9 +27,6 @@ importers:
|
|||||||
'@typescript-eslint/parser':
|
'@typescript-eslint/parser':
|
||||||
specifier: 7.2.0
|
specifier: 7.2.0
|
||||||
version: 7.2.0(eslint@8.57.0)(typescript@5.8.3)
|
version: 7.2.0(eslint@8.57.0)(typescript@5.8.3)
|
||||||
axios:
|
|
||||||
specifier: 1.8.4
|
|
||||||
version: 1.8.4
|
|
||||||
esbuild:
|
esbuild:
|
||||||
specifier: 0.25.2
|
specifier: 0.25.2
|
||||||
version: 0.25.2
|
version: 0.25.2
|
||||||
@ -32,9 +36,6 @@ importers:
|
|||||||
eslint-config-prettier:
|
eslint-config-prettier:
|
||||||
specifier: 9.1.0
|
specifier: 9.1.0
|
||||||
version: 9.1.0(eslint@8.57.0)
|
version: 9.1.0(eslint@8.57.0)
|
||||||
lodash-es:
|
|
||||||
specifier: 4.17.21
|
|
||||||
version: 4.17.21
|
|
||||||
prettier:
|
prettier:
|
||||||
specifier: 3.5.3
|
specifier: 3.5.3
|
||||||
version: 3.5.3
|
version: 3.5.3
|
||||||
|
Loading…
Reference in New Issue
Block a user