Skip to content

Commit

Permalink
Specify platform in a FROM clause
Browse files Browse the repository at this point in the history
  • Loading branch information
theihor committed Nov 13, 2024
1 parent b8cb4c8 commit 76bd67b
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 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 amd64/ubuntu:${UBUNTU_VERSION} as ld-prefix
FROM --platform=linux/amd64 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/amd64" 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/amd64" 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 s390x/ubuntu:${UBUNTU_VERSION}
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

0 comments on commit 76bd67b

Please sign in to comment.