Skip to content

Commit 72c01b6

Browse files
authored
Merge pull request #266 from TopRichard/macOS-Tahoe-Ubuntu-22.04
Add EESSI client container for macOS-26.x
2 parents fee5164 + 60fd7d2 commit 72c01b6

2 files changed

Lines changed: 63 additions & 3 deletions

File tree

.github/workflows/build-publish-containers.yml

Lines changed: 14 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ jobs:
3333
contents: read
3434
strategy:
3535
matrix:
36-
tag: ['client:rocky8', 'build-node:debian11', 'build-node:debian12', 'build-node:debian13']
36+
tag: ['client:rocky8', 'build-node:debian11', 'build-node:debian12', 'build-node:debian13', 'client:ubuntu22.04-macOS-26']
3737
platform: [amd64, arm64, riscv64]
3838
exclude:
3939
# exclude images that don't support RISC-V
@@ -43,6 +43,11 @@ jobs:
4343
platform: riscv64
4444
- tag: build-node:debian12
4545
platform: riscv64
46+
# limit the new macOS to arm64 only
47+
- tag: client:ubuntu22.04-macOS-26
48+
platform: amd64
49+
- tag: client:ubuntu22.04-macOS-26
50+
platform: riscv64
4651

4752
steps:
4853
- name: Check out the repo
@@ -100,7 +105,7 @@ jobs:
100105
contents: read
101106
strategy:
102107
matrix:
103-
tag: ['client:rocky8', 'build-node:debian11', 'build-node:debian12', 'build-node:debian13']
108+
tag: ['client:rocky8', 'build-node:debian11', 'build-node:debian12', 'build-node:debian13', 'client:ubuntu22.04-macOS-26']
104109
steps:
105110
- name: Login to GitHub Container Registry
106111
if: github.event_name != 'pull_request'
@@ -114,6 +119,12 @@ jobs:
114119
run: |
115120
echo REPOSITORY_OWNER=$(echo ${{ github.repository_owner }} | tr '[:upper:]' '[:lower:]') >> $GITHUB_ENV
116121
122+
- name: Create the final image using "docker buildx imagetools create"
123+
if: github.event_name != 'pull_request' && matrix.tag == 'client:ubuntu22.04-macOS-26'
124+
run: |
125+
docker buildx imagetools create -t ghcr.io/${{ env.REPOSITORY_OWNER }}/${{ matrix.tag }} \
126+
ghcr.io/${{ env.REPOSITORY_OWNER }}/${{ matrix.tag }}-arm64
127+
117128
- name: Create the final image using "docker buildx imagetools create"
118129
if: github.event_name != 'pull_request' && matrix.tag == 'build-node:debian13'
119130
run: |
@@ -123,7 +134,7 @@ jobs:
123134
ghcr.io/${{ env.REPOSITORY_OWNER }}/${{ matrix.tag }}-riscv64
124135
125136
- name: Create the final image using "docker buildx imagetools create"
126-
if: github.event_name != 'pull_request' && matrix.tag != 'build-node:debian13'
137+
if: github.event_name != 'pull_request' && matrix.tag != 'build-node:debian13' && matrix.tag != 'client:ubuntu22.04-macOS-26'
127138
run: |
128139
docker buildx imagetools create -t ghcr.io/${{ env.REPOSITORY_OWNER }}/${{ matrix.tag }} \
129140
ghcr.io/${{ env.REPOSITORY_OWNER }}/${{ matrix.tag }}-amd64 \
Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
FROM ubuntu:22.04
2+
3+
ENV DEBIAN_FRONTEND=noninteractive
4+
# These args are designed to match macOS defaults
5+
# macOS typical IDs:
6+
# UID=501 -> first user account
7+
# GID=20 -> "staff" group
8+
# Matching these allows mounted volumes from macOS to be writable
9+
ARG USERNAME=eessi
10+
ARG UID=501
11+
ARG GID=20
12+
13+
RUN set -eux; \
14+
apt-get update -o Acquire::Retries=5 -o Acquire::http::Timeout=30; \
15+
apt-get install -y --no-install-recommends \
16+
ca-certificates \
17+
wget \
18+
git \
19+
curl \
20+
cpio \
21+
gnupg2 \
22+
sudo \
23+
fuse \
24+
rpm \
25+
rpm2cpio; \
26+
update-ca-certificates; \
27+
rm -rf /var/lib/apt/lists/*
28+
29+
RUN useradd --uid ${UID} --gid ${GID} \
30+
--create-home --shell /bin/bash ${USERNAME} && \
31+
echo "${USERNAME} ALL=(ALL) NOPASSWD:ALL" > /etc/sudoers.d/${USERNAME} && \
32+
chmod 0440 /etc/sudoers.d/${USERNAME}
33+
34+
# Install cvmfsexec
35+
ARG CVMFSEXEC_VERSION=v4.51
36+
RUN git clone --branch ${CVMFSEXEC_VERSION} --depth 1 https://github.com/cvmfs/cvmfsexec.git /opt/cvmfsexec && \
37+
cd /opt/cvmfsexec && \
38+
./makedist default && \
39+
chown -R ${USERNAME} /opt/cvmfsexec
40+
41+
WORKDIR /home/${USERNAME}
42+
43+
# Run container as non-root user
44+
USER ${USERNAME}
45+
46+
ENTRYPOINT ["/bin/sh", "-c", "\
47+
sudo chown $(id -un) /dev/fuse 2>/dev/null || true; \
48+
exec /opt/cvmfsexec/cvmfsexec software.eessi.io -- \"$@\" \
49+
", "--"]

0 commit comments

Comments
 (0)