mirror of
https://github.com/pixelfed/pixelfed.git
synced 2024-11-09 16:24:51 +00:00
improve Dockerfile for composer.json+composer.lock
This commit is contained in:
parent
8d61b8d250
commit
d2ed117d3f
1 changed files with 2 additions and 3 deletions
|
@ -186,12 +186,11 @@ COPY --link --from=composer-image /usr/bin/composer /usr/bin/composer
|
||||||
#! Changing user to runtime user
|
#! Changing user to runtime user
|
||||||
USER ${RUNTIME_UID}:${RUNTIME_GID}
|
USER ${RUNTIME_UID}:${RUNTIME_GID}
|
||||||
|
|
||||||
# Copy over only composer related files so docker layer cache isn't invalidated on PHP file changes
|
|
||||||
COPY --chown=${RUNTIME_UID}:${RUNTIME_GID} composer.json composer.lock /var/www/
|
|
||||||
|
|
||||||
# Install composer dependencies
|
# Install composer dependencies
|
||||||
# NOTE: we skip the autoloader generation here since we don't have all files avaliable (yet)
|
# NOTE: we skip the autoloader generation here since we don't have all files avaliable (yet)
|
||||||
RUN --mount=type=cache,id=pixelfed-composer-${PHP_VERSION}-${PHP_DEBIAN_RELEASE}-${TARGETPLATFORM},sharing=locked,target=/cache/composer \
|
RUN --mount=type=cache,id=pixelfed-composer-${PHP_VERSION}-${PHP_DEBIAN_RELEASE}-${TARGETPLATFORM},sharing=locked,target=/cache/composer \
|
||||||
|
--mount=type=bind,source=composer.json,target=/var/www/composer.json \
|
||||||
|
--mount=type=bind,source=composer.lock,target=/var/www/composer.lock \
|
||||||
set -ex \
|
set -ex \
|
||||||
&& composer install --prefer-dist --no-autoloader --ignore-platform-reqs
|
&& composer install --prefer-dist --no-autoloader --ignore-platform-reqs
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue