diff --git a/.devcontainer/alpine/devcontainer.json b/.devcontainer/alpine/devcontainer.json new file mode 100644 index 00000000..4ee9ca38 --- /dev/null +++ b/.devcontainer/alpine/devcontainer.json @@ -0,0 +1,18 @@ +{ + "customizations": { + "vscode": { + "extensions": [ + "ms-vscode.cpptools-extension-pack", + "ms-vscode.cmake-tools", + "ms-python.python" + ], + "settings": { + "C_Cpp.default.configurationProvider": "ms-vscode.cmake-tools", + "cmake.configureOnOpen": true + } + } + }, + "image": "ghcr.io/learning-process/ppc-alpine:1.0", + "name": "Parallel Programming Course (Alpine)", + "postCreateCommand": "python3 -m pip install -r requirements.txt" +} diff --git a/.devcontainer/devcontainer.json b/.devcontainer/ubuntu/devcontainer.json similarity index 89% rename from .devcontainer/devcontainer.json rename to .devcontainer/ubuntu/devcontainer.json index 190b724b..8babf718 100644 --- a/.devcontainer/devcontainer.json +++ b/.devcontainer/ubuntu/devcontainer.json @@ -13,6 +13,6 @@ } }, "image": "ghcr.io/learning-process/ppc-ubuntu:1.1", - "name": "Parallel Programming Course", + "name": "Parallel Programming Course (Ubuntu)", "postCreateCommand": "python3 -m pip install -r requirements.txt" } diff --git a/.github/workflows/docker.yml b/.github/workflows/docker.yml index 1c7b7a28..c5f7786a 100644 --- a/.github/workflows/docker.yml +++ b/.github/workflows/docker.yml @@ -43,11 +43,20 @@ jobs: username: ${{ github.actor }} password: ${{ secrets.DOCKER_TOKEN }} - - name: Build and push multi-arch image + - name: Build and push multi-arch image (Ubuntu) uses: docker/build-push-action@v6 with: context: . file: ./docker/ubuntu.Dockerfile platforms: linux/amd64,linux/arm64 push: ${{ github.ref == 'refs/heads/master' }} - tags: ghcr.io/learning-process/ppc-ubuntu:1.1 + tags: ghcr.io/learning-process/ppc-alpine:1.0 + + - name: Build and push multi-arch image (Alpine) + uses: docker/build-push-action@v6 + with: + context: . + file: ./docker/alpine.Dockerfile + platforms: linux/amd64,linux/arm64 + push: ${{ github.ref == 'refs/heads/master' }} + tags: ghcr.io/learning-process/ppc-alpine:1.0 diff --git a/.github/workflows/perf.yml b/.github/workflows/perf.yml index dad64199..b75f2fbb 100644 --- a/.github/workflows/perf.yml +++ b/.github/workflows/perf.yml @@ -11,7 +11,7 @@ jobs: ubuntu-gcc-build-perf-stats: runs-on: ubuntu-24.04 container: - image: ghcr.io/learning-process/ppc-ubuntu:1.1 + image: ghcr.io/learning-process/ppc-alpine:1.0 credentials: username: ${{ github.actor }} password: ${{ secrets.GITHUB_TOKEN }} diff --git a/.github/workflows/pre-commit.yml b/.github/workflows/pre-commit.yml index 09e07ce0..f1a07bbb 100644 --- a/.github/workflows/pre-commit.yml +++ b/.github/workflows/pre-commit.yml @@ -23,7 +23,7 @@ jobs: needs: check-file-sizes runs-on: ubuntu-24.04 container: - image: ghcr.io/learning-process/ppc-ubuntu:1.1 + image: ghcr.io/learning-process/ppc-alpine:1.0 credentials: username: ${{ github.actor }} password: ${{ secrets.GITHUB_TOKEN }} diff --git a/.github/workflows/static-analysis-pr.yml b/.github/workflows/static-analysis-pr.yml index e37371fb..66f7e5ee 100644 --- a/.github/workflows/static-analysis-pr.yml +++ b/.github/workflows/static-analysis-pr.yml @@ -27,7 +27,7 @@ jobs: clang-tidy: runs-on: ubuntu-24.04 container: - image: ghcr.io/learning-process/ppc-ubuntu:1.1 + image: ghcr.io/learning-process/ppc-alpine:1.0 credentials: username: ${{ github.actor }} password: ${{ secrets.GITHUB_TOKEN }} @@ -76,7 +76,7 @@ jobs: - clang-tidy runs-on: ubuntu-24.04 container: - image: ghcr.io/learning-process/ppc-ubuntu:1.1 + image: ghcr.io/learning-process/ppc-alpine:1.0 credentials: username: ${{ github.actor }} password: ${{ secrets.GITHUB_TOKEN }} diff --git a/.github/workflows/ubuntu.yml b/.github/workflows/ubuntu.yml index a213a6d0..60f425e4 100644 --- a/.github/workflows/ubuntu.yml +++ b/.github/workflows/ubuntu.yml @@ -11,7 +11,7 @@ jobs: gcc-build: runs-on: ${{ matrix.os }} container: - image: ghcr.io/learning-process/ppc-ubuntu:1.1 + image: ghcr.io/learning-process/ppc-alpine:1.0 credentials: username: ${{ github.actor }} password: ${{ secrets.GITHUB_TOKEN }} @@ -65,7 +65,7 @@ jobs: - gcc-build runs-on: ${{ matrix.os }} container: - image: ghcr.io/learning-process/ppc-ubuntu:1.1 + image: ghcr.io/learning-process/ppc-alpine:1.0 credentials: username: ${{ github.actor }} password: ${{ secrets.GITHUB_TOKEN }} @@ -97,7 +97,7 @@ jobs: - gcc-test runs-on: ${{ matrix.os }} container: - image: ghcr.io/learning-process/ppc-ubuntu:1.1 + image: ghcr.io/learning-process/ppc-alpine:1.0 credentials: username: ${{ github.actor }} password: ${{ secrets.GITHUB_TOKEN }} @@ -121,7 +121,7 @@ jobs: clang-build: runs-on: ${{ matrix.os }} container: - image: ghcr.io/learning-process/ppc-ubuntu:1.1 + image: ghcr.io/learning-process/ppc-alpine:1.0 credentials: username: ${{ github.actor }} password: ${{ secrets.GITHUB_TOKEN }} @@ -166,7 +166,7 @@ jobs: - clang-build runs-on: ${{ matrix.os }} container: - image: ghcr.io/learning-process/ppc-ubuntu:1.1 + image: ghcr.io/learning-process/ppc-alpine:1.0 credentials: username: ${{ github.actor }} password: ${{ secrets.GITHUB_TOKEN }} @@ -198,7 +198,7 @@ jobs: - clang-test runs-on: ${{ matrix.os }} container: - image: ghcr.io/learning-process/ppc-ubuntu:1.1 + image: ghcr.io/learning-process/ppc-alpine:1.0 credentials: username: ${{ github.actor }} password: ${{ secrets.GITHUB_TOKEN }} @@ -224,7 +224,7 @@ jobs: - clang-build runs-on: ${{ matrix.os }} container: - image: ghcr.io/learning-process/ppc-ubuntu:1.1 + image: ghcr.io/learning-process/ppc-alpine:1.0 credentials: username: ${{ github.actor }} password: ${{ secrets.GITHUB_TOKEN }} @@ -271,7 +271,7 @@ jobs: - clang-sanitizer-build runs-on: ${{ matrix.os }} container: - image: ghcr.io/learning-process/ppc-ubuntu:1.1 + image: ghcr.io/learning-process/ppc-alpine:1.0 credentials: username: ${{ github.actor }} password: ${{ secrets.GITHUB_TOKEN }} @@ -309,7 +309,7 @@ jobs: - clang-sanitizer-test runs-on: ${{ matrix.os }} container: - image: ghcr.io/learning-process/ppc-ubuntu:1.1 + image: ghcr.io/learning-process/ppc-alpine:1.0 credentials: username: ${{ github.actor }} password: ${{ secrets.GITHUB_TOKEN }} @@ -342,7 +342,7 @@ jobs: issues: write pull-requests: write container: - image: ghcr.io/learning-process/ppc-ubuntu:1.1 + image: ghcr.io/learning-process/ppc-alpine:1.0 credentials: username: ${{ github.actor }} password: ${{ secrets.GITHUB_TOKEN }} diff --git a/docker/CHANGELOG.md b/docker/CHANGELOG.md index 1dfb1b31..3cf1bfd3 100644 --- a/docker/CHANGELOG.md +++ b/docker/CHANGELOG.md @@ -8,3 +8,8 @@ Changelog ### [1.0] - 2025-07-28 - Initial Ubuntu-based image + +## ppc-alpine + +### [1.0] - 2025-12-17 +- Initial Alpine-based image (Alpine 3.23) diff --git a/docker/README.md b/docker/README.md index c7efccac..2b2026cb 100644 --- a/docker/README.md +++ b/docker/README.md @@ -11,3 +11,9 @@ Build multi-architecture Ubuntu 24.04 development image: ```bash docker buildx build --platform linux/amd64,linux/arm64 -t ghcr.io/learning-process/ppc-ubuntu:latest -f ./ubuntu.Dockerfile . ``` + +Build multi-architecture Alpine development image: + +```bash +docker buildx build --platform linux/amd64,linux/arm64 -t ghcr.io/learning-process/ppc-alpine:latest -f ./alpine.Dockerfile . +``` diff --git a/docker/alpine.Dockerfile b/docker/alpine.Dockerfile new file mode 100644 index 00000000..d60be4f8 --- /dev/null +++ b/docker/alpine.Dockerfile @@ -0,0 +1,31 @@ +FROM alpine:3.23 + +RUN set -eux; \ + apk add --no-cache \ + bash \ + build-base \ + ca-certificates \ + ccache \ + clang \ + clang-extra-tools \ + cmake \ + curl \ + git \ + gnupg \ + linux-headers \ + lld \ + llvm \ + make \ + ninja \ + openmp \ + openmp-dev \ + openmpi \ + openmpi-dev \ + python3 \ + py3-pip \ + valgrind \ + zip + +ENV CC=gcc CXX=g++ + +CMD ["bash"]