From cb68a83c7caced42808f6636b3c71d097492ea79 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Emilio=20L=C3=B3pez?= Date: Mon, 12 Dec 2022 11:47:36 -0300 Subject: [PATCH 1/2] docker: simplify dockerfile The echidna container has been updated and now has Python 3.8 in it --- Dockerfile | 14 +------------- 1 file changed, 1 insertion(+), 13 deletions(-) diff --git a/Dockerfile b/Dockerfile index 8794b18..6369946 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,18 +1,6 @@ FROM trailofbits/echidna:latest -RUN apt-get update && apt-get install -y python3.8-dev -RUN update-alternatives --install /usr/bin/python python /usr/bin/python3.8 1 && \ - update-alternatives --set python /usr/bin/python3.8 - -RUN python -m pip install --upgrade pip - -RUN mkdir /optik COPY . /optik - -WORKDIR /optik - -RUN python -m pip install . - -RUN mkdir /workdir +RUN pip3 install --no-cache-dir /optik WORKDIR /workdir From 4c611c49a6d9cfcec069e91924ef8d042795665e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Emilio=20L=C3=B3pez?= Date: Mon, 12 Dec 2022 11:53:14 -0300 Subject: [PATCH 2/2] docker: add CI build and push to GHCR --- .github/workflows/docker.yml | 52 ++++++++++++++++++++++++++++++++++++ 1 file changed, 52 insertions(+) create mode 100644 .github/workflows/docker.yml diff --git a/.github/workflows/docker.yml b/.github/workflows/docker.yml new file mode 100644 index 0000000..b332013 --- /dev/null +++ b/.github/workflows/docker.yml @@ -0,0 +1,52 @@ +name: Docker + +on: + push: + branches: + - master + - github-docker + tags: + - '*' + +jobs: + docker: + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v3 + + - name: Set up Docker Buildx + uses: docker/setup-buildx-action@v2 + id: buildx + with: + install: true + + - name: Set Docker metadata + id: meta-ubuntu + uses: docker/metadata-action@v4 + with: + images: | + ghcr.io/${{ github.repository }} + tags: | + type=ref,event=tag + type=ref,event=branch,prefix=testing- + type=edge + + - name: GitHub Container Registry Login + uses: docker/login-action@v2 + with: + registry: ghcr.io + username: ${{ github.actor }} + password: ${{ secrets.GITHUB_TOKEN }} + + - name: Docker Build and Push + uses: docker/build-push-action@v3 + with: + platforms: linux/amd64 + file: Dockerfile + pull: true + push: true + tags: ${{ steps.meta-ubuntu.outputs.tags }} + labels: ${{ steps.meta-ubuntu.outputs.labels }} + cache-from: type=gha + cache-to: type=gha,mode=max