diff --git a/.github/workflows/layer-build.yaml b/.github/workflows/layer-build.yaml index 214a967..d4a1bd9 100644 --- a/.github/workflows/layer-build.yaml +++ b/.github/workflows/layer-build.yaml @@ -28,8 +28,17 @@ jobs: uses: docker/build-push-action@v6 with: context: . - file: layer-build/Dockerfile + file: layer-build/x86_64.Dockerfile platforms: linux/amd64 push: true tags: | - ghcr.io/metalbear-co/ci-layer-build:latest \ No newline at end of file + ghcr.io/metalbear-co/ci-layer-build:latest + - name: Build and push + uses: docker/build-push-action@v6 + with: + context: . + file: layer-build/aarch64.Dockerfile + platforms: linux/amd64 + push: true + tags: | + ghcr.io/metalbear-co/ci-layer-build-aarch64:latest \ No newline at end of file diff --git a/layer-build/Dockerfile b/layer-build/Dockerfile deleted file mode 100644 index 6712f95..0000000 --- a/layer-build/Dockerfile +++ /dev/null @@ -1,13 +0,0 @@ -# Dockerfile used for building mirrord-layer for x64 with very old libc -# this to support centos7 or Amazon Linux 2. - -FROM ghcr.io/cross-rs/x86_64-unknown-linux-gnu:main-centos - -# This fails to compile but tbh shouldn't really change so just stick with old always T_T -RUN yum update -y && \ - yum install centos-release-scl -y && \ - yum install llvm-toolset-7 -y - -ENV LIBCLANG_PATH=/opt/rh/llvm-toolset-7/root/usr/lib64/ \ - LIBCLANG_STATIC_PATH=/opt/rh/llvm-toolset-7/root/usr/lib64/ \ - CLANG_PATH=/opt/rh/llvm-toolset-7/root/usr/bin/clang \ No newline at end of file diff --git a/layer-build/aarch64.Dockerfile b/layer-build/aarch64.Dockerfile new file mode 100644 index 0000000..042ec3b --- /dev/null +++ b/layer-build/aarch64.Dockerfile @@ -0,0 +1,25 @@ +# Dockerfile used for building mirrord-layer for aarch64 with very old libc +# this to support centos7 or Amazon Linux 2. + +FROM ghcr.io/cross-rs/aarch64-unknown-linux-gnu:main-centos + +RUN sed -i s/mirror.centos.org/vault.centos.org/g /etc/yum.repos.d/CentOS-*.repo && \ + sed -i s/^#.*baseurl=http/baseurl=http/g /etc/yum.repos.d/CentOS-*.repo && \ + sed -i s/^mirrorlist=http/#mirrorlist=http/g /etc/yum.repos.d/CentOS-*.repo + + +RUN yum update -y && \ + yum install centos-release-scl -y + +# centos-release-scl adds another repo so need to patch again +RUN sed -i s/mirror.centos.org/vault.centos.org/g /etc/yum.repos.d/CentOS-*.repo && \ + sed -i s/^#.*baseurl=http/baseurl=http/g /etc/yum.repos.d/CentOS-*.repo && \ + sed -i s/^mirrorlist=http/#mirrorlist=http/g /etc/yum.repos.d/CentOS-*.repo + + +RUN yum update -y && \ + yum install llvm-toolset-7 -y + +ENV LIBCLANG_PATH=/opt/rh/llvm-toolset-7/root/usr/lib64/ \ + LIBCLANG_STATIC_PATH=/opt/rh/llvm-toolset-7/root/usr/lib64/ \ + CLANG_PATH=/opt/rh/llvm-toolset-7/root/usr/bin/clang \ No newline at end of file diff --git a/layer-build/x86_64.Dockerfile b/layer-build/x86_64.Dockerfile new file mode 100644 index 0000000..b011c08 --- /dev/null +++ b/layer-build/x86_64.Dockerfile @@ -0,0 +1,24 @@ +# Dockerfile used for building mirrord-layer for x64 with very old libc +# this to support centos7 or Amazon Linux 2. + +FROM ghcr.io/cross-rs/x86_64-unknown-linux-gnu:main-centos + +RUN sed -i s/mirror.centos.org/vault.centos.org/g /etc/yum.repos.d/CentOS-*.repo && \ + sed -i s/^#.*baseurl=http/baseurl=http/g /etc/yum.repos.d/CentOS-*.repo && \ + sed -i s/^mirrorlist=http/#mirrorlist=http/g /etc/yum.repos.d/CentOS-*.repo + + +RUN yum update -y && \ + yum install centos-release-scl -y + +# centos-release-scl adds another repo so need to patch again +RUN sed -i s/mirror.centos.org/vault.centos.org/g /etc/yum.repos.d/CentOS-*.repo && \ + sed -i s/^#.*baseurl=http/baseurl=http/g /etc/yum.repos.d/CentOS-*.repo && \ + sed -i s/^mirrorlist=http/#mirrorlist=http/g /etc/yum.repos.d/CentOS-*.repo + +RUN yum update -y && \ + yum install llvm-toolset-7 -y + +ENV LIBCLANG_PATH=/opt/rh/llvm-toolset-7/root/usr/lib64/ \ + LIBCLANG_STATIC_PATH=/opt/rh/llvm-toolset-7/root/usr/lib64/ \ + CLANG_PATH=/opt/rh/llvm-toolset-7/root/usr/bin/clang \ No newline at end of file