From 52aa04c59c34194aaac0b3fce197881894a96cb1 Mon Sep 17 00:00:00 2001 From: Matthew Baggett Date: Wed, 7 Feb 2024 22:58:31 +0100 Subject: [PATCH] Improve bouncer build --- .github/workflows/bouncer.yml | 4 ++-- bouncer/Dockerfile | 6 +----- 2 files changed, 3 insertions(+), 7 deletions(-) diff --git a/.github/workflows/bouncer.yml b/.github/workflows/bouncer.yml index 38a00cf..2e6759e 100644 --- a/.github/workflows/bouncer.yml +++ b/.github/workflows/bouncer.yml @@ -95,8 +95,8 @@ jobs: tags: | ${{ !env.ACT && 'benzine/bouncer:latest' || '' }} ${{ !env.ACT && 'ghcr.io/benzine-framework/bouncer:latest' || 'ghcr.io/benzine-framework/bouncer:devel' }} - cache-from: ${{ !env.ACT && 'type=gha' || 'type=local,src=/tmp' }} - cache-to: ${{ !env.ACT && 'type=gha,mode=max' || 'type=local,dest=/tmp' }} + cache-from: ${{ !env.ACT && 'type=gha' || '' }} + cache-to: ${{ !env.ACT && 'type=gha,mode=max' || '' }} build-contexts: | php:cli=docker-image://ghcr.io/benzine-framework/php:cli-8.2 diff --git a/bouncer/Dockerfile b/bouncer/Dockerfile index 855def5..472c0cd 100644 --- a/bouncer/Dockerfile +++ b/bouncer/Dockerfile @@ -6,8 +6,7 @@ LABEL maintainer="Matthew Baggett " \ USER root # ts:skip=AC_DOCKER_0002 Mis-detecting usage of apt instead of apt-get # Install nginx, certbot -RUN adduser bouncer && \ - apt-get -qq update && \ +RUN apt-get -qq update && \ # Install pre-dependencies to use apt-key. apt-get -yqq install --no-install-recommends \ lsb-core \ @@ -81,9 +80,6 @@ EXPOSE 443 # Down-privelege to bouncer USER bouncer -# Install Composer dependencies even though we don't need to, it should be done in the build process -RUN composer install - # Set a healthcheck to curl the bouncer and expect a 200 HEALTHCHECK --start-period=30s \ CMD curl -s -o /dev/null -w "200" http://localhost:80/ || exit 1