Skip to content

Commit edc759e

Browse files
authored
Merge pull request #2 from sysprog21/feat/multi-arch-docker-image
Update GithubCI to perform docker image build and push for both x86 and aarch64
2 parents f27b334 + 43be41d commit edc759e

File tree

2 files changed

+19
-16
lines changed

2 files changed

+19
-16
lines changed

.github/workflows/docker.yml

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,32 +1,32 @@
1-
name: Publish Docker image
1+
name: Publish Docker image to DockerHub
22
on:
33
push:
4-
branches: [ master ]
4+
branches: [ dev ]
55
pull_request:
6+
branches: [ dev ]
67

8+
# https://docs.docker.com/build/ci/github-actions/multi-platform/
79
jobs:
810
docker:
911
name: Build Docker Image and Publish (only on push)
1012
runs-on: ubuntu-latest
1113
steps:
12-
14+
1315
- name: Check out the repo
14-
uses: actions/checkout@v2
15-
16-
# Steps required by docker/build-push-action@v2
16+
uses: actions/checkout@v4
1717
- name: Set up QEMU
18-
uses: docker/setup-qemu-action@v1
18+
uses: docker/setup-qemu-action@v3
1919
- name: Set up Docker Buildx
20-
uses: docker/setup-buildx-action@v1
21-
- name: Login to DockerHub
22-
uses: docker/login-action@v1
23-
if: github.event_name == 'push'
20+
uses: docker/setup-buildx-action@v3
21+
- name: Login to Docker Hub
22+
uses: docker/login-action@v3
2423
with:
2524
username: ${{ secrets.DOCKERHUB_USERNAME }}
2625
password: ${{ secrets.DOCKERHUB_ACCESS_TOKEN }}
27-
28-
- name: Build (always) and Publish (only on push)
29-
uses: docker/build-push-action@v2
26+
- name: Build and push
27+
uses: docker/build-push-action@v5
3028
with:
31-
tags: ucbbar/chisel-bootcamp:latest
32-
push: ${{ github.event_name == 'push' }}
29+
context: .
30+
platforms: linux/amd64,linux/arm64
31+
push: true
32+
tags: sysprog21/chisel-bootcamp:latest

Dockerfile

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,8 @@ RUN \
99
graphviz \
1010
openjdk-8-jre-headless \
1111
python3-distutils \
12+
gcc \
13+
python3-dev \
1214
&& \
1315
rm -rf /var/lib/apt/lists/*
1416

@@ -61,6 +63,7 @@ COPY --from=intermediate-builder /coursier_cache/ /coursier_cache/
6163
COPY --from=intermediate-builder /usr/local/share/jupyter/kernels/scala/ /usr/local/share/jupyter/kernels/scala/
6264

6365
RUN chown -R bootcamp:bootcamp /chisel-bootcamp
66+
RUN chown -R bootcamp:bootcamp /jupyter
6467

6568
USER bootcamp
6669
WORKDIR /chisel-bootcamp

0 commit comments

Comments
 (0)