Skip to content

Commit

Permalink
Fix docker build with composer 2.7
Browse files Browse the repository at this point in the history
  • Loading branch information
vtsykun committed Feb 12, 2024
1 parent 7879310 commit b705ecb
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 19 deletions.
16 changes: 3 additions & 13 deletions .github/workflows/docker_gcr.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -25,12 +25,6 @@ jobs:
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3

- name: Cache Docker layers
uses: actions/cache@v4
with:
path: /tmp/.buildx-cache
key: ${{ runner.os }}-gcr-docker

- name: Login to GitHub Container Registry
uses: docker/login-action@v3
with:
Expand All @@ -42,13 +36,9 @@ jobs:
uses: docker/build-push-action@v5
with:
context: .
file: Dockerfile
push: true
tags: ghcr.io/${{ github.repository }}:latest
platforms: linux/amd64
cache-from: type=local,src=/tmp/.buildx-cache
cache-to: type=local,dest=/tmp/.buildx-cache-new,mode=max

- name: Move cache
run: |
rm -rf /tmp/.buildx-cache
mv /tmp/.buildx-cache-new /tmp/.buildx-cache
cache-from: type=gha,scope=${{ github.workflow }}
cache-to: type=gha,scope=${{ github.workflow }},mode=max
4 changes: 0 additions & 4 deletions .github/workflows/docker_hub.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,3 @@ jobs:
platforms: linux/amd64,linux/arm64
cache-from: type=gha,scope=${{ github.workflow }}
cache-to: type=gha,scope=${{ github.workflow }},mode=max

# Issue https://github.com/rust-lang/cargo/issues/10583
build-args: |
CARGO_NET_GIT_FETCH_WITH_CLI=true
5 changes: 3 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -48,8 +48,9 @@ RUN composer install --no-interaction --no-suggest --no-dev --no-scripts && \

COPY --chown=82:82 . /var/www/packagist/

RUN composer run-script auto-scripts && \
mkdir var/composer var/zipball && \
RUN export COMPOSER_ALLOW_SUPERUSER=1; \
composer run-script auto-scripts; \
mkdir var/composer var/zipball; \
rm -rf /root/.composer var/cache

RUN set -eux; \
Expand Down

0 comments on commit b705ecb

Please sign in to comment.