Skip to content

Build ppc64le multiarch docker image #15

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

Draft
wants to merge 12 commits into
base: main
Choose a base branch
from
Draft
Show file tree
Hide file tree
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
3 changes: 2 additions & 1 deletion .github/workflows/image_build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,8 @@ jobs:
with:
image: ${{ env.IMAGE_NAME }}
tags: latest ${{ github.sha }} ${{ steps.cleaned_ref_name.outputs.ref_name }}
archs: amd64, arm64, s390x
# skip arm64 because of https://github.com/dotnet/sdk/issues/29892
archs: amd64, ppc64le, s390x
containerfiles: |
./Dockerfile

Expand Down
18 changes: 10 additions & 8 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,34 +1,36 @@
# Arguments for DEV's (comment static FROM and uncomnnet #DEV ones)
ARG UBI_VERSION=8
ARG DOTNET_VERSION=60
ARG DOTNET_VERSION=70
ARG UBI_BUILD_TAG=latest
ARG UBI_RUNTIME_TAG=latest
ARG IMAGE_BUILD=registry.access.redhat.com/ubi${UBI_VERSION}/dotnet-${DOTNET_VERSION}:${UBI_TAG}
ARG IMAGE_BASE=registry.access.redhat.com/ubi${UBI_VERSION}/dotnet-${DOTNET_VERSION}-runtime:${UBI_RUNTIME_TAG}

#DEV FROM $IMAGE_BUILD AS build
FROM registry.access.redhat.com/ubi8/dotnet-60:6.0-29 AS build
FROM quay.io/fedora/fedora:38 AS build

RUN dnf install -y dotnet-sdk-7.0

USER root
COPY . /src
WORKDIR /src

# https://community.ibm.com/community/user/powerdeveloper/blogs/alhad-deshpande/2023/01/13/identityserver-sqlite-db-on-net-7
RUN dnf install -y findutils sed
RUN find -name '*.csproj' -exec sed -i 's|<TargetFramework>net6.0</TargetFramework>|<TargetFramework>net7.0</TargetFramework>|' {} \;

RUN dotnet publish -c Release -o /publish

RUN echo "package info:("$(dotnet list cli-proton-dotnet.sln package)")" >> /publish/VERSION.txt

#DEV FROM $IMAGE_BASE
FROM registry.access.redhat.com/ubi8/dotnet-60-runtime:6.0-29
FROM quay.io/fedora/fedora:38

LABEL name="Red Hat Messaging QE - Proton Dotnet CLI Image" \
run="podman run --rm -ti <image_name:tag> /bin/bash cli-proton-dotnet-*"

USER root

# install fallocate for use by claire tests
RUN dnf -y --setopt=install_weak_deps=0 --setopt=tsflags=nodocs install \
util-linux \
&& dnf clean all -y
RUN dnf install -y dotnet-runtime-7.0 && dnf clean all

RUN mkdir /licenses
COPY ./LICENSE /licenses/LICENSE.txt
Expand Down