Skip to content
Merged
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
15 changes: 12 additions & 3 deletions .github/workflows/build-and-push-images.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ jobs:
uses: actions/checkout@v3

- name: Log in to the Container registry
uses: docker/login-action@v3
uses: docker/login-action@4907a6ddec9925e35a0a9e82d7399ccc52663121
if: github.event_name != 'pull_request'
with:
registry: ${{ env.REGISTRY }}
Expand All @@ -35,7 +35,7 @@ jobs:

- name: Extract metadata (tags, labels) for Docker
id: meta
uses: docker/metadata-action@v5
uses: docker/metadata-action@030e881283bb7a6894de51c315a6bfe6a94e05cf
with:
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
flavor: |
Expand All @@ -46,10 +46,19 @@ jobs:
# set latest tag for default branch
type=raw,value=latest,enable={{is_default_branch}}

- name: Set up QEMU
uses: docker/setup-qemu-action@ce360397dd3f832beb865e1373c09c0e9f86d70a
with:
platforms: arm64

- name: Set up Docker Buildx
uses: docker/setup-buildx-action@4d04d5d9486b7bd6fa91e7baf45bbb4f8b9deedd

- name: Build and push Docker image
uses: docker/build-push-action@v4
uses: docker/build-push-action@d08e5c354a6adb9ed34480a06d141179aa583294
with:
context: .
platforms: linux/amd64,linux/arm64
push: ${{ github.event_name != 'pull_request' }}
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
21 changes: 14 additions & 7 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,8 @@ FROM rockylinux:9

ARG BUILD_DATE
ARG VCS_REF
ARG REPO=http://linux.mellanox.com/public/repo/mlnx_ofed/latest-23.10/rhel9.4/mellanox_mlnx_ofed.repo
ARG TARGETARCH
ARG VERSION=3.2.3

LABEL \
org.label-schema.name="jumanjiman/opensm" \
Expand All @@ -16,12 +17,18 @@ LABEL \
org.label-schema.original-repo-url="https://github.com/jumanjihouse/docker-opensm" \
org.label-schema.modified-by="Tom Clark <tom@stackhpc.com>"

RUN dnf install -y 'dnf-command(config-manager)' \
&& dnf config-manager --add-repo https://linux.mellanox.com/public/repo/doca/3.2.3/rhel9/x86_64/ \
&& rpm --import https://linux.mellanox.com/public/repo/doca/3.2.3/rhel9/x86_64/RPM-GPG-KEY-doca \
&& dnf install -y doca-ofed \
&& dnf clean all \
&& rm -rf /var/cache/dnf
RUN set -eux; \
dnf install -y 'dnf-command(config-manager)'; \
case "${TARGETARCH}" in \
amd64) repo_arch=x86_64 ;; \
arm64) repo_arch=arm64-sbsa ;; \
*) echo "Unsupported architecture: ${TARGETARCH}" >&2; exit 1 ;; \
esac; \
dnf config-manager --add-repo "https://linux.mellanox.com/public/repo/doca/${VERSION}/rhel9/${repo_arch}/"; \
rpm --import "https://linux.mellanox.com/public/repo/doca/${VERSION}/rhel9/${repo_arch}/RPM-GPG-KEY-doca"; \
dnf install -y doca-ofed; \
dnf clean all; \
rm -rf /var/cache/dnf

# The following environment variables control opensm behavior:
#
Expand Down
Loading