From f7d857d7a5eb8e82625083eb81fb59092a50a78a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20BEAU?= Date: Mon, 21 Oct 2024 17:07:28 +0200 Subject: [PATCH] Update varnish version --- .github/workflows/ci.yml | 33 +++++++++++++++++++++++++++++++++ Dockerfile | 19 +------------------ config/template.vcl | 2 +- 3 files changed, 35 insertions(+), 19 deletions(-) create mode 100644 .github/workflows/ci.yml diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 0000000..8500ab8 --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,33 @@ +name: Build + +on: + push: + branches: + - master + tags: + - '*' + +jobs: + build-image: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + - name: Set up Docker Buildx + uses: docker/setup-buildx-action@v1 + - name: Login to ghcr.io + uses: docker/login-action@v1 + with: + registry: ghcr.io + username: ${{ github.repository_owner }} + password: ${{ secrets.GITHUB_TOKEN }} + - name: Build image + uses: docker/build-push-action@v2 + with: + context: shopinvader + file: shopinvader/Dockerfile + tags: | + ghcr.io/${{ github.repository }}:latest, + ghcr.io/${{ github.repository }}:${{ github.ref_name }} + cache-from: type=registry,ref=ghcr.io/${{ github.repository }}:latest + cache-to: type=inline + push: true diff --git a/Dockerfile b/Dockerfile index 27594d8..e868b87 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,21 +1,4 @@ -FROM ubuntu:bionic-20181018 - -USER root - -RUN DEBIAN_FRONTEND=noninteractive && \ - apt-get update && \ - apt-get install -y curl && \ - curl -s https://packagecloud.io/install/repositories/varnishcache/varnish60lts/script.deb.sh | bash &&\ - apt-get install -y varnish varnish-dev && \ - apt-get clean - -RUN mkdir /tmp/varnish && \ - cd /tmp/varnish && \ - curl https://download.varnish-software.com/varnish-modules/varnish-modules-0.15.0.tar.gz -o modules.tar.gz && \ - tar zxvf modules.tar.gz && \ - cd varnish-modules-0.15.0 && \ - ./configure && make && make install && \ - rm -rf /tmp/varnish +FROM varnish:7.6.0 RUN curl -s https://raw.githubusercontent.com/camptocamp/docker-odoo-project/master/install/dockerize.sh | bash diff --git a/config/template.vcl b/config/template.vcl index 08f8f56..8c1ce74 100644 --- a/config/template.vcl +++ b/config/template.vcl @@ -10,7 +10,7 @@ # Marker to tell the VCL compiler that this VCL has been adapted to the # new 4.0 format. -vcl 4.0; +vcl 4.1; import header; import cookie;