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
|
||||
|
||||
# install composer dependencies
|
||||
COPY --from=composer:latest /usr/bin/composer /usr/bin/composer
|
||||
COPY composer.json composer.lock ./
|
||||
RUN --mount=type=secret,id=GITEA_TOKEN \
|
||||
test -n "${GITEA_TOKEN}" && \
|
||||
export TOKEN=$(cat /run/secrets/GITEA_TOKEN) && \
|
||||
composer config --global auth.http-basic.seu-gitea.com token $TOKEN && \
|
||||
composer install --no-dev --optimize-autoloader
|
||||
RUN composer install \
|
||||
--no-dev \
|
||||
--no-interaction \
|
||||
--optimize-autoloader \
|
||||
--no-scripts
|
||||
|
||||
# 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
|
||||
@@ -44,3 +45,6 @@ EOF
|
||||
COPY docker/wordpress/scripts/docker-entrypoint.d/* /docker-entrypoint.d/
|
||||
|
||||
RUN chmod +x /docker-entrypoint.d/*.sh
|
||||
|
||||
# cleanup
|
||||
RUN rm /usr/bin/composer
|
||||
Reference in New Issue
Block a user