Skip to content

Commit

Permalink
Build multi-arch images in github action and add git to the images.
Browse files Browse the repository at this point in the history
  • Loading branch information
stuartcaunt committed Jan 8, 2025
1 parent a982e44 commit 09243cd
Show file tree
Hide file tree
Showing 6 changed files with 17 additions and 9 deletions.
16 changes: 12 additions & 4 deletions .github/workflows/docker-image.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,23 +13,31 @@ jobs:
- name: Checkout
uses: actions/checkout@v3

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

- name: Login to GHCR
uses: docker/login-action@v2
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}

- name: Build and push
- name: Build and Push Multi-Architecture Images
run: |
repo_owner=$(echo "${{ github.repository_owner }}" | tr '[:upper:]' '[:lower:]')
for file in *.dockerfile; do
if [ -f "$file" ]; then
# Extract image name and tag
image_name=$(basename "$file" | sed -E 's/\.dockerfile//; s/-([^-]+)$/:\1/')
# Build and push the image
docker build -t ghcr.io/$repo_owner/$image_name -f "$file" .
docker push ghcr.io/$repo_owner/$image_name
full_image_name="ghcr.io/$repo_owner/$image_name"
# Build and push for multiple architectures
docker buildx build \
--platform linux/amd64,linux/arm64 \
-t $full_image_name \
-f "$file" \
--push .
fi
done
2 changes: 1 addition & 1 deletion webx-dev-env-debian-11.dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ RUN DEBIAN_FRONTEND=noninteractive apt install -y file cmake dpkg-dev pkg-config

RUN DEBIAN_FRONTEND=noninteractive apt install -y xfce4 xrdp dbus dbus-x11
RUN DEBIAN_FRONTEND=noninteractive apt install -y xterm terminator nano less
RUN DEBIAN_FRONTEND=noninteractive apt install -y curl unzip
RUN DEBIAN_FRONTEND=noninteractive apt install -y curl unzip git

# Ensure webx-engine is mounted to /app

Expand Down
2 changes: 1 addition & 1 deletion webx-dev-env-debian-12.dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ RUN apt install -y file cmake dpkg-dev pkg-config build-essential libzmq3-dev li

RUN apt install -y xfce4 xrdp dbus dbus-x11
RUN apt install -y xterm terminator nano less
RUN apt install -y curl unzip
RUN apt install -y curl unzip git

# Ensure webx-engine is mounted to /app

Expand Down
2 changes: 1 addition & 1 deletion webx-dev-env-ubuntu-20.04.dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ RUN DEBIAN_FRONTEND=noninteractive apt install -y file cmake dpkg-dev pkg-config

RUN DEBIAN_FRONTEND=noninteractive apt install -y xfce4 xrdp dbus dbus-x11
RUN DEBIAN_FRONTEND=noninteractive apt install -y xterm terminator nano less
RUN DEBIAN_FRONTEND=noninteractive apt install -y curl unzip
RUN DEBIAN_FRONTEND=noninteractive apt install -y curl unzip git

# Ensure webx-engine is mounted to /app

Expand Down
2 changes: 1 addition & 1 deletion webx-dev-env-ubuntu-22.04.dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ RUN DEBIAN_FRONTEND=noninteractive apt install -y file cmake dpkg-dev pkg-config

RUN DEBIAN_FRONTEND=noninteractive apt install -y xfce4 xrdp dbus dbus-x11
RUN DEBIAN_FRONTEND=noninteractive apt install -y xterm terminator nano less
RUN DEBIAN_FRONTEND=noninteractive apt install -y curl unzip
RUN DEBIAN_FRONTEND=noninteractive apt install -y curl unzip git

# Ensure webx-engine is mounted to /app

Expand Down
2 changes: 1 addition & 1 deletion webx-dev-env-ubuntu-24.04.dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ RUN apt install -y file cmake dpkg-dev pkg-config build-essential libzmq3-dev li

RUN apt install -y xfce4 xrdp dbus dbus-x11
RUN apt install -y xterm terminator nano less
RUN apt install -y curl unzip
RUN apt install -y curl unzip git

# Ensure webx-engine is mounted to /app

Expand Down

0 comments on commit 09243cd

Please sign in to comment.