fix: install composer from composer image
This commit is contained in:
@@ -15,12 +15,13 @@ RUN curl -O https://raw.githubusercontent.com/wp-cli/builds/gh-pages/phar/wp-cli
|
|||||||
mv wp-cli.phar /usr/local/bin/wp
|
mv wp-cli.phar /usr/local/bin/wp
|
||||||
|
|
||||||
# install composer dependencies
|
# install composer dependencies
|
||||||
|
COPY --from=composer:latest /usr/bin/composer /usr/bin/composer
|
||||||
COPY composer.json composer.lock ./
|
COPY composer.json composer.lock ./
|
||||||
RUN --mount=type=secret,id=GITEA_TOKEN \
|
RUN composer install \
|
||||||
test -n "${GITEA_TOKEN}" && \
|
--no-dev \
|
||||||
export TOKEN=$(cat /run/secrets/GITEA_TOKEN) && \
|
--no-interaction \
|
||||||
composer config --global auth.http-basic.seu-gitea.com token $TOKEN && \
|
--optimize-autoloader \
|
||||||
composer install --no-dev --optimize-autoloader
|
--no-scripts
|
||||||
|
|
||||||
# modify docker entrypoint for running any .sh scripts found under /usr/local/bin/docker-entrypoint.d
|
# modify docker entrypoint for running any .sh scripts found under /usr/local/bin/docker-entrypoint.d
|
||||||
# scripts will run as www-data if endedd with .unpriv.sh or as root elsewhere
|
# scripts will run as www-data if endedd with .unpriv.sh or as root elsewhere
|
||||||
@@ -44,3 +45,6 @@ EOF
|
|||||||
COPY docker/wordpress/scripts/docker-entrypoint.d/* /docker-entrypoint.d/
|
COPY docker/wordpress/scripts/docker-entrypoint.d/* /docker-entrypoint.d/
|
||||||
|
|
||||||
RUN chmod +x /docker-entrypoint.d/*.sh
|
RUN chmod +x /docker-entrypoint.d/*.sh
|
||||||
|
|
||||||
|
# cleanup
|
||||||
|
RUN rm /usr/bin/composer
|
||||||
Reference in New Issue
Block a user