From f23cac854aab2f7eb2ecb01e574571f00a0437fd Mon Sep 17 00:00:00 2001 From: Ruben ten Hove Date: Sat, 18 Jun 2022 08:03:58 -0400 Subject: [PATCH 1/4] fix image build and push --- .../workflows/build_aflplusplus_docker.yaml | 56 +++++++++---------- 1 file changed, 28 insertions(+), 28 deletions(-) diff --git a/.github/workflows/build_aflplusplus_docker.yaml b/.github/workflows/build_aflplusplus_docker.yaml index a26f31d2..9ff8312a 100644 --- a/.github/workflows/build_aflplusplus_docker.yaml +++ b/.github/workflows/build_aflplusplus_docker.yaml @@ -3,37 +3,37 @@ name: Publish Docker Images on: push: branches: - - stable - - dev + - stable + - dev jobs: push_to_registry: name: Push Docker images to Dockerhub runs-on: ubuntu-latest steps: - - uses: actions/checkout@master - - name: Set up QEMU - uses: docker/setup-qemu-action@v1 - - name: Set up Docker Buildx - uses: docker/setup-buildx-action@v1 - - name: Login to Dockerhub - uses: docker/login-action@v1 - with: - username: ${{ secrets.DOCKER_USERNAME }} - password: ${{ secrets.DOCKER_TOKEN }} - - name: Publish aflpp ${{ github.ref }} to Registry - uses: docker/build-push-action@v2 - with: - context: . - platforms: linux/amd64,linux/arm64 - push: true - tags: aflplusplus/aflplusplus:${{ github.ref }} - if: "${{ github.ref }}" == "dev" - - name: Publish aflpp ${{ github.ref }} and latest to Registry - uses: docker/build-push-action@v2 - with: - context: . - platforms: linux/amd64,linux/arm64 - push: true - tags: aflplusplus/aflplusplus:${{ github.ref }},aflplusplus/aflplusplus:latest - if: "${{ github.ref }}" == "stable" + - uses: actions/checkout@master + - name: Set up QEMU + uses: docker/setup-qemu-action@v2 + - name: Set up Docker Buildx + uses: docker/setup-buildx-action@v2 + - name: Login to Dockerhub + uses: docker/login-action@v2 + with: + username: ${{ secrets.DOCKER_USERNAME }} + password: ${{ secrets.DOCKER_TOKEN }} + - name: Publish dev as dev to docker.io registry + uses: docker/build-push-action@v3 + with: + context: . + platforms: linux/amd64,linux/arm64 + push: true + tags: aflplusplus/aflplusplus:${{ github.ref_name }} + if: ${{ github.ref_name == 'dev' }} + - name: Publish stable as stable and latest to docker.io registry + uses: docker/build-push-action@v3 + with: + context: . + platforms: linux/amd64,linux/arm64 + push: true + tags: aflplusplus/aflplusplus:${{ github.ref_name }},aflplusplus/aflplusplus:latest + if: ${{ github.ref_name == 'stable' }} From b0e58baca2e5f67ce7304545e656868005ff73bd Mon Sep 17 00:00:00 2001 From: Ruben ten Hove Date: Sat, 18 Jun 2022 08:21:25 -0400 Subject: [PATCH 2/4] add stable tag to docs --- README.md | 8 ++++---- docs/INSTALL.md | 4 ++-- docs/fuzzing_in_depth.md | 2 +- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/README.md b/README.md index c3a627ec..d8498520 100644 --- a/README.md +++ b/README.md @@ -50,14 +50,14 @@ Here is some information to get you started: ## Building and installing AFL++ To have AFL++ easily available with everything compiled, pull the image directly -from the Docker Hub (available for x86_64 and arm64): +from the Docker Hub (available for both x86_64 and arm64): ```shell -docker pull aflplusplus/aflplusplus -docker run -ti -v /location/of/your/target:/src aflplusplus/aflplusplus +docker pull aflplusplus/aflplusplus:stable +docker run -ti -v /location/of/your/target:/src aflplusplus/aflplusplus:stable ``` -This image is automatically generated when a push to the stable repo happens +This image is automatically published when a push to the stable branch happens (see [branches](#branches)). If you use the command above, you will find your target source code in `/src` in the container. diff --git a/docs/INSTALL.md b/docs/INSTALL.md index 754621b5..ac7b5486 100644 --- a/docs/INSTALL.md +++ b/docs/INSTALL.md @@ -8,8 +8,8 @@ hence afl-clang-lto is available) or just pull directly from the Docker Hub (for x86_64 and arm64): ```shell -docker pull aflplusplus/aflplusplus -docker run -ti -v /location/of/your/target:/src aflplusplus/aflplusplus +docker pull aflplusplus/aflplusplus:stable +docker run -ti -v /location/of/your/target:/src aflplusplus/aflplusplus:stable ``` This image is automatically generated when a push to the stable repo happens. diff --git a/docs/fuzzing_in_depth.md b/docs/fuzzing_in_depth.md index 2c27dfe1..d5fae0a6 100644 --- a/docs/fuzzing_in_depth.md +++ b/docs/fuzzing_in_depth.md @@ -47,7 +47,7 @@ tasks, fuzzing may put a strain on your hardware and on the OS. In particular: example, the following line will run a Docker container with all this preset: ```shell - # docker run -ti --mount type=tmpfs,destination=/ramdisk -e AFL_TMPDIR=/ramdisk aflplusplus/aflplusplus + # docker run -ti --mount type=tmpfs,destination=/ramdisk -e AFL_TMPDIR=/ramdisk aflplusplus/aflplusplus:stable ``` ## 1. Instrumenting the target From 51a88b17b318768b95442a74358f056768146d57 Mon Sep 17 00:00:00 2001 From: Ruben ten Hove Date: Sat, 18 Jun 2022 08:31:37 -0400 Subject: [PATCH 3/4] add tagged releases --- .github/workflows/build_aflplusplus_docker.yaml | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/.github/workflows/build_aflplusplus_docker.yaml b/.github/workflows/build_aflplusplus_docker.yaml index 9ff8312a..7245a84e 100644 --- a/.github/workflows/build_aflplusplus_docker.yaml +++ b/.github/workflows/build_aflplusplus_docker.yaml @@ -5,6 +5,8 @@ on: branches: - stable - dev + tags: + - '*' jobs: push_to_registry: @@ -37,3 +39,11 @@ jobs: push: true tags: aflplusplus/aflplusplus:${{ github.ref_name }},aflplusplus/aflplusplus:latest if: ${{ github.ref_name == 'stable' }} + - name: Publish tagged release to docker.io registry + uses: docker/build-push-action@v3 + with: + context: . + platforms: linux/amd64,linux/arm64 + push: true + tags: aflplusplus/aflplusplus:${{ github.ref_name }} + if: ${{ github.ref_type == 'tag' }} From 85b1ce00a8c2c955f33d412d2f288807fe9b4d3e Mon Sep 17 00:00:00 2001 From: Ruben ten Hove Date: Sat, 18 Jun 2022 08:35:25 -0400 Subject: [PATCH 4/4] fully qualified names --- README.md | 4 ++-- docs/INSTALL.md | 4 ++-- docs/fuzzing_in_depth.md | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index d8498520..91345d0c 100644 --- a/README.md +++ b/README.md @@ -53,8 +53,8 @@ To have AFL++ easily available with everything compiled, pull the image directly from the Docker Hub (available for both x86_64 and arm64): ```shell -docker pull aflplusplus/aflplusplus:stable -docker run -ti -v /location/of/your/target:/src aflplusplus/aflplusplus:stable +docker pull docker.io/aflplusplus/aflplusplus:stable +docker run -ti -v /location/of/your/target:/src docker.io/aflplusplus/aflplusplus:stable ``` This image is automatically published when a push to the stable branch happens diff --git a/docs/INSTALL.md b/docs/INSTALL.md index ac7b5486..e29fca96 100644 --- a/docs/INSTALL.md +++ b/docs/INSTALL.md @@ -8,8 +8,8 @@ hence afl-clang-lto is available) or just pull directly from the Docker Hub (for x86_64 and arm64): ```shell -docker pull aflplusplus/aflplusplus:stable -docker run -ti -v /location/of/your/target:/src aflplusplus/aflplusplus:stable +docker pull docker.io/aflplusplus/aflplusplus:stable +docker run -ti -v /location/of/your/target:/src docker.io/aflplusplus/aflplusplus:stable ``` This image is automatically generated when a push to the stable repo happens. diff --git a/docs/fuzzing_in_depth.md b/docs/fuzzing_in_depth.md index d5fae0a6..8963c635 100644 --- a/docs/fuzzing_in_depth.md +++ b/docs/fuzzing_in_depth.md @@ -47,7 +47,7 @@ tasks, fuzzing may put a strain on your hardware and on the OS. In particular: example, the following line will run a Docker container with all this preset: ```shell - # docker run -ti --mount type=tmpfs,destination=/ramdisk -e AFL_TMPDIR=/ramdisk aflplusplus/aflplusplus:stable + # docker run -ti --mount type=tmpfs,destination=/ramdisk -e AFL_TMPDIR=/ramdisk docker.io/aflplusplus/aflplusplus:stable ``` ## 1. Instrumenting the target