mirror of
https://github.com/AFLplusplus/AFLplusplus.git
synced 2025-06-13 02:28:09 +00:00
Build docker images for arm64 as well as x86.
This involves: * A small change to the Dockerfile, so that it checks the target architecture and only installs gcc-multilib on x86_64. * Updates to the GitHub Actions workflow build_aflplusplus_docker.yaml to build for both linux/amd64 and linux/arm64. These changes should allow Mac M1 users to get a working version of AFL++ by doing "docker pull aflplusplus/aflplusplus".
This commit is contained in:
@ -12,6 +12,10 @@ jobs:
|
|||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@master
|
- 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
|
- name: Login to Dockerhub
|
||||||
uses: docker/login-action@v1
|
uses: docker/login-action@v1
|
||||||
with:
|
with:
|
||||||
@ -21,5 +25,6 @@ jobs:
|
|||||||
uses: docker/build-push-action@v2
|
uses: docker/build-push-action@v2
|
||||||
with:
|
with:
|
||||||
context: .
|
context: .
|
||||||
|
platforms: linux/amd64,linux/arm64
|
||||||
push: true
|
push: true
|
||||||
tags: aflplusplus/aflplusplus:latest
|
tags: aflplusplus/aflplusplus:latest
|
||||||
|
13
Dockerfile
13
Dockerfile
@ -39,13 +39,20 @@ RUN echo "deb http://ppa.launchpad.net/ubuntu-toolchain-r/test/ubuntu focal main
|
|||||||
|
|
||||||
RUN apt-get update && apt-get full-upgrade -y && \
|
RUN apt-get update && apt-get full-upgrade -y && \
|
||||||
apt-get -y install --no-install-suggests --no-install-recommends \
|
apt-get -y install --no-install-suggests --no-install-recommends \
|
||||||
gcc-10 g++-10 gcc-10-plugin-dev gcc-10-multilib gcc-multilib gdb lcov \
|
gcc-10 g++-10 gcc-10-plugin-dev gdb lcov \
|
||||||
clang-12 clang-tools-12 libc++1-12 libc++-12-dev \
|
clang-12 clang-tools-12 libc++1-12 libc++-12-dev \
|
||||||
libc++abi1-12 libc++abi-12-dev libclang1-12 libclang-12-dev \
|
libc++abi1-12 libc++abi-12-dev libclang1-12 libclang-12-dev \
|
||||||
libclang-common-12-dev libclang-cpp12 libclang-cpp12-dev liblld-12 \
|
libclang-common-12-dev libclang-cpp12 libclang-cpp12-dev liblld-12 \
|
||||||
liblld-12-dev liblldb-12 liblldb-12-dev libllvm12 libomp-12-dev \
|
liblld-12-dev liblldb-12 liblldb-12-dev libllvm12 libomp-12-dev \
|
||||||
libomp5-12 lld-12 lldb-12 llvm-12 llvm-12-dev llvm-12-runtime llvm-12-tools \
|
libomp5-12 lld-12 lldb-12 llvm-12 llvm-12-dev llvm-12-runtime llvm-12-tools
|
||||||
&& rm -rf /var/lib/apt/lists/*
|
|
||||||
|
# arm64 doesn't have gcc-multilib, and it's only used for -m32 support on x86
|
||||||
|
ARG TARGETPLATFORM
|
||||||
|
RUN [ "$TARGETPLATFORM" = "linux/amd64" ] && \
|
||||||
|
apt-get -y install --no-install-suggests --no-install-recommends \
|
||||||
|
gcc-10-multilib gcc-multilib || true
|
||||||
|
|
||||||
|
RUN rm -rf /var/lib/apt/lists/*
|
||||||
|
|
||||||
RUN update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-10 0
|
RUN update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-10 0
|
||||||
RUN update-alternatives --install /usr/bin/g++ g++ /usr/bin/g++-10 0
|
RUN update-alternatives --install /usr/bin/g++ g++ /usr/bin/g++-10 0
|
||||||
|
Reference in New Issue
Block a user