Skip to content

Commit 1c983ad

Browse files
authored
Merge pull request #233 from bedroge/container_based_on_build_node
Use container images based on software layer's build node images
2 parents 0340c7e + 575c244 commit 1c983ad

File tree

3 files changed

+103
-0
lines changed

3 files changed

+103
-0
lines changed
Lines changed: 61 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,61 @@
1+
name: Build and publish EESSI Docker image used for building the compatibility layer
2+
on:
3+
push:
4+
branches:
5+
- main
6+
paths:
7+
- Dockerfile.build-node-compat-layer-*
8+
- bootstrap-prefix.sh
9+
10+
pull_request:
11+
branches:
12+
- main
13+
paths:
14+
- Dockerfile.build-node-compat-layer-*
15+
- bootstrap-prefix.sh
16+
17+
# Declare default permissions as read only.
18+
permissions: read-all
19+
20+
jobs:
21+
build_and_publish:
22+
name: Build and publish image
23+
runs-on: ubuntu-24.04-arm
24+
permissions:
25+
packages: write
26+
strategy:
27+
matrix:
28+
include:
29+
- os: 'debian-12'
30+
platform: 'amd64, arm64'
31+
- os: 'debian-13'
32+
platform: 'amd64, arm64, riscv64'
33+
steps:
34+
- name: Check out the repo
35+
uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
36+
37+
- name: Set up QEMU
38+
uses: docker/setup-qemu-action@c7c53464625b32c7a7e944ae62b3e17d2b600130 # v3.7.0
39+
40+
- name: Set up Docker Buildx
41+
uses: docker/setup-buildx-action@8d2750c68a42422c14e847fe6c8ac0403b4cbd6f # v3.12.0
42+
43+
- name: Login to GitHub Container Registry
44+
if: github.event_name != 'pull_request'
45+
uses: docker/login-action@5e57cd118135c172c3672efd75eb46360885c0ef # v3.6.0
46+
with:
47+
registry: ghcr.io
48+
username: ${{ github.repository_owner }}
49+
password: ${{ secrets.GITHUB_TOKEN }}
50+
51+
- name: Convert and store repository owner in lowercase
52+
run: |
53+
echo "REPOSITORY_OWNER=$(echo ${{ github.repository_owner }} | tr '[:upper:]' '[:lower:]')" >> $GITHUB_ENV
54+
55+
- name: Build and push to GitHub Packages
56+
uses: docker/build-push-action@263435318d21b8e681c14492fe198d362a7d2c83 # v6.18.0
57+
with:
58+
tags: ghcr.io/${{ env.REPOSITORY_OWNER }}/build-node-compat-layer:${{ matrix.os }}
59+
file: Dockerfile.build-node-compat-layer-${{ matrix.os }}
60+
platforms: ${{ matrix.platform }}
61+
push: ${{ github.event_name != 'pull_request' }}
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
FROM ghcr.io/eessi/build-node:debian12
2+
3+
COPY bootstrap-prefix.sh /usr/local/bin/bootstrap-prefix.sh
4+
5+
RUN apt-get update
6+
RUN apt-get install -y gcc g++ make diffutils libgmp-dev perl wget
7+
RUN apt-get install -y git python3-pip python3-cryptography python3-venv
8+
RUN python3 -m venv --system-site-packages /opt/ansible && \
9+
. /opt/ansible/bin/activate && \
10+
pip3 install --upgrade pip && \
11+
pip3 install ansible && \
12+
ln -s /opt/ansible/bin/ansible* /usr/local/bin/ && \
13+
deactivate
14+
RUN chmod 755 /usr/local/bin/bootstrap-prefix.sh
15+
16+
ENV LC_ALL=C.UTF-8
17+
ENV PATH=/usr/local/bin:$PATH
18+
19+
RUN groupadd -g 1001 portage && useradd -ms /bin/bash -u 1001 -g portage portage
20+
21+
ENTRYPOINT ["/usr/local/bin/bootstrap-prefix.sh"]
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
FROM ghcr.io/eessi/build-node:debian13
2+
3+
COPY bootstrap-prefix.sh /usr/local/bin/bootstrap-prefix.sh
4+
5+
RUN apt-get update
6+
RUN apt-get install -y gcc g++ make diffutils libgmp-dev perl wget rustc
7+
RUN apt-get install -y git python3-pip python3-cryptography python3-venv
8+
RUN python3 -m venv --system-site-packages /opt/ansible && \
9+
. /opt/ansible/bin/activate && \
10+
pip3 install --upgrade pip && \
11+
pip3 install ansible && \
12+
ln -s /opt/ansible/bin/ansible* /usr/local/bin/ && \
13+
deactivate
14+
RUN chmod 755 /usr/local/bin/bootstrap-prefix.sh
15+
16+
ENV LC_ALL=C.UTF-8
17+
ENV PATH=/usr/local/bin:$PATH
18+
19+
RUN groupadd -g 1001 portage && useradd -ms /bin/bash -u 1001 -g portage portage
20+
21+
ENTRYPOINT ["/usr/local/bin/bootstrap-prefix.sh"]

0 commit comments

Comments
 (0)