Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use arm64 runner binaries on s390x #60

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 7 additions & 7 deletions s390x.Dockerfile
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
# Self-Hosted IBM Z Github Actions Runner.
ARG UBUNTU_VERSION=focal
# Temporary image: amd64 dependencies.
FROM --platform=linux/amd64 ubuntu:${UBUNTU_VERSION} AS ld-prefix
# Temporary image: arm64 dependencies.
FROM --platform=linux/aarch64 ubuntu:${UBUNTU_VERSION} AS ld-prefix

Check warning on line 4 in s390x.Dockerfile

View workflow job for this annotation

GitHub Actions / build (focal, s390x)

FROM --platform flag should not use a constant value

FromPlatformFlagConstDisallowed: FROM --platform flag should not use constant value "linux/aarch64" More info: https://docs.docker.com/go/dockerfile/rule/from-platform-flag-const-disallowed/

Check warning on line 4 in s390x.Dockerfile

View workflow job for this annotation

GitHub Actions / build (noble, s390x)

FROM --platform flag should not use a constant value

FromPlatformFlagConstDisallowed: FROM --platform flag should not use constant value "linux/aarch64" More info: https://docs.docker.com/go/dockerfile/rule/from-platform-flag-const-disallowed/
# Redefining UBUNTU_VERSION without a value inherits the global default
ARG UBUNTU_VERSION
ENV DEBIAN_FRONTEND=noninteractive
RUN apt-get update && apt-get -y install ca-certificates && if [ ${UBUNTU_VERSION} = "focal" ]; then apt-get -y install libicu66 libssl1.1; else apt-get -y install libicu74 libssl3t64; fi

# Main image.
FROM --platform=linux/s390x ubuntu:${UBUNTU_VERSION}

Check warning on line 11 in s390x.Dockerfile

View workflow job for this annotation

GitHub Actions / build (focal, s390x)

FROM --platform flag should not use a constant value

FromPlatformFlagConstDisallowed: FROM --platform flag should not use constant value "linux/s390x" More info: https://docs.docker.com/go/dockerfile/rule/from-platform-flag-const-disallowed/

Check warning on line 11 in s390x.Dockerfile

View workflow job for this annotation

GitHub Actions / build (noble, s390x)

FROM --platform flag should not use a constant value

FromPlatformFlagConstDisallowed: FROM --platform flag should not use constant value "linux/s390x" More info: https://docs.docker.com/go/dockerfile/rule/from-platform-flag-const-disallowed/

# Packages for libbpf testing that are not installed by .github/actions/setup.
ENV DEBIAN_FRONTEND=noninteractive
Expand Down Expand Up @@ -50,18 +50,18 @@
USER runner
ENV USER=runner
WORKDIR ${homedir}
RUN curl -L https://github.com/actions/runner/releases/download/v${version}/actions-runner-linux-x64-${version}.tar.gz | tar -xz
RUN curl -L https://github.com/actions/runner/releases/download/v${version}/actions-runner-linux-arm64-${version}.tar.gz | tar -xz
USER root

# WARNING: This needs to be set at the end of the file or it will have side effects when building the container
# from within a foreign arch (like building on x86 host).
# amd64 dependencies.
# More specifically this is setting QEMU_LD_PREFIX that causes issue, but before touching system
# files, we may as well finish any prior installs.
COPY --from=ld-prefix / /usr/x86_64-linux-gnu/
RUN ln -fs ../lib/x86_64-linux-gnu/ld-linux-x86-64.so.2 /usr/x86_64-linux-gnu/lib64/
RUN ln -fs /etc/resolv.conf /usr/x86_64-linux-gnu/etc/
ENV QEMU_LD_PREFIX=/usr/x86_64-linux-gnu
COPY --from=ld-prefix / /usr/aarch64-linux-gnu/
RUN ln -fs ../lib/aarch64-linux-gnu/ld-linux-aarch64.so.2 /usr/aarch64-linux-gnu/
RUN ln -fs /etc/resolv.conf /usr/aarch64-linux-gnu/etc/
ENV QEMU_LD_PREFIX=/usr/aarch64-linux-gnu

ENTRYPOINT ["/entrypoint.sh"]
CMD ["./bin/Runner.Listener", "run", "--startuptype", "service"]
Loading