Multistage build to remove unused php code in final build
All checks were successful
ci/woodpecker/push/woodpecker Pipeline was successful

This commit is contained in:
2025-02-11 15:03:55 +00:00
parent 64dff1c895
commit 41e54dc1f7
2 changed files with 14 additions and 9 deletions

View File

@ -1,4 +1,9 @@
FROM composer
WORKDIR /src
COPY . /src
RUN ls
RUN composer update --no-dev
FROM php:8.4-cli-alpine
COPY . /app
WORKDIR /app
COPY --from=0 ./src /app
WORKDIR /app
ENTRYPOINT ["./backup"]

12
composer.lock generated
View File

@ -6401,12 +6401,12 @@
"source": {
"type": "git",
"url": "https://github.com/vimeo/psalm.git",
"reference": "d577f78e60d7aff42e42af7825c0c978b094a558"
"reference": "c56f798cd4b33ae9d21ef042ffe44ad748c3e288"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/vimeo/psalm/zipball/d577f78e60d7aff42e42af7825c0c978b094a558",
"reference": "d577f78e60d7aff42e42af7825c0c978b094a558",
"url": "https://api.github.com/repos/vimeo/psalm/zipball/c56f798cd4b33ae9d21ef042ffe44ad748c3e288",
"reference": "c56f798cd4b33ae9d21ef042ffe44ad748c3e288",
"shasum": ""
},
"require": {
@ -6429,11 +6429,11 @@
"fidry/cpu-core-counter": "^0.4.1 || ^0.5.1 || ^1.0.0",
"netresearch/jsonmapper": "^1.0 || ^2.0 || ^3.0 || ^4.0",
"nikic/php-parser": "^5.0.0",
"php": "~8.1.17 || ~8.2.4 || ~8.3.0 || ~8.4.0",
"php": "~8.1.31 || ~8.2.27 || ~8.3.16 || ~8.4.3",
"sebastian/diff": "^4.0 || ^5.0 || ^6.0 || ^7.0",
"spatie/array-to-xml": "^2.17.0 || ^3.0",
"symfony/console": "^6.0 || ^7.0",
"symfony/filesystem": "^6.0 || ^7.0"
"symfony/filesystem": "~6.3.12 || ~6.4.3 || ^7.0.3"
},
"provide": {
"psalm/psalm": "self.version"
@ -6509,7 +6509,7 @@
"issues": "https://github.com/vimeo/psalm/issues",
"source": "https://github.com/vimeo/psalm"
},
"time": "2025-02-09T20:34:37+00:00"
"time": "2025-02-10T17:52:05+00:00"
},
{
"name": "webmozart/assert",