Skip to content

Commit e487a6b

Browse files
authored
Switch default base image, adjust other base images (#75)
1 parent 29b5e3a commit e487a6b

File tree

3 files changed

+32
-38
lines changed

3 files changed

+32
-38
lines changed

.github/workflows/build.yml

Lines changed: 22 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ on:
77
pull_request:
88

99
env:
10-
DEFAULT_BASE_IMAGE: ubuntu:jammy
10+
DEFAULT_BASE_IMAGE: ubuntu:noble
1111

1212
jobs:
1313
version:
@@ -18,8 +18,8 @@ jobs:
1818
version-changed: ${{ steps.version-metadata.outputs.changed }}
1919
new-version: ${{ steps.version-metadata.outputs.newVersion }}
2020
steps:
21-
- uses: actions/checkout@v4
22-
- uses: Quantco/ui-actions/version-metadata@v1
21+
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
22+
- uses: Quantco/ui-actions/version-metadata@cd71d2a0e30b25569f6d723e57acca83347e58fc # v1.0.18
2323
id: version-metadata
2424
with:
2525
file: Dockerfile
@@ -39,31 +39,24 @@ jobs:
3939
fail-fast: false
4040
matrix:
4141
base-image:
42+
# https://hub.docker.com/_/debian
4243
- debian:bookworm-slim # 12
4344
- debian:bookworm # 12
4445
- debian:bullseye-slim # 11
4546
- debian:bullseye # 11
47+
# https://hub.docker.com/_/ubuntu
48+
- ubuntu:plucky # 25.04
49+
- ubuntu:oracular # 24.10
4650
- ubuntu:noble # 24.04
47-
- ubuntu:mantic # 23.10
4851
- ubuntu:jammy # 22.04
4952
- ubuntu:focal # 20.04
50-
- nvidia/cuda:12.3.1-base-ubuntu22.04
51-
- nvidia/cuda:12.3.1-base-ubuntu20.04
52-
- nvidia/cuda:12.2.2-base-ubuntu22.04
53-
- nvidia/cuda:12.2.2-base-ubuntu20.04
54-
- nvidia/cuda:12.1.1-base-ubuntu22.04
55-
- nvidia/cuda:12.1.1-base-ubuntu20.04
56-
- nvidia/cuda:11.8.0-base-ubuntu22.04
57-
- nvidia/cuda:11.8.0-base-ubuntu20.04
58-
- nvidia/cuda:11.7.1-base-ubuntu22.04
59-
- nvidia/cuda:11.7.1-base-ubuntu20.04
60-
- nvidia/cuda:11.6.2-base-ubuntu20.04
61-
- nvidia/cuda:11.4.3-base-ubuntu20.04
62-
- nvidia/cuda:11.3.1-base-ubuntu20.04
63-
- nvidia/cuda:11.2.2-base-ubuntu20.04
53+
# https://hub.docker.com/r/nvidia/cuda
54+
- nvidia/cuda:12.6.3-base-ubuntu24.04
55+
- nvidia/cuda:12.6.3-base-ubuntu22.04
56+
- nvidia/cuda:12.6.3-base-ubuntu20.04
6457
steps:
6558
- name: Checkout source
66-
uses: actions/checkout@v4
59+
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
6760
- name: Set image variables
6861
id: image-variables
6962
env:
@@ -76,8 +69,9 @@ jobs:
7669
code_names = {
7770
"22.04": "jammy",
7871
"20.04": "focal",
79-
"23.10": "mantic",
8072
"24.04": "noble",
73+
"24.10": "oracular",
74+
"25.05": "plucky"
8175
}
8276
ubuntu_version_number = base_image.split("-ubuntu")[-1]
8377
base_tag = base_image.split(":")[-1]
@@ -97,7 +91,7 @@ jobs:
9791
shell: python
9892
- name: Get docker metadata
9993
id: metadata
100-
uses: docker/metadata-action@369eb591f429131d6889c46b94e711f089e6ca96
94+
uses: docker/metadata-action@369eb591f429131d6889c46b94e711f089e6ca96 # v5.6.1
10195
with:
10296
images: |-
10397
ghcr.io/prefix-dev/pixi
@@ -112,16 +106,16 @@ jobs:
112106
type=semver,pattern={{version}},enable=${{ steps.image-variables.outputs.is-default }},value=${{ needs.version.outputs.new-version }},priority=800
113107
type=semver,pattern={{version}}-${{ steps.image-variables.outputs.tag }},value=${{ needs.version.outputs.new-version }},priority=500
114108
- name: Setup docker buildx
115-
uses: docker/setup-buildx-action@6524bf65af31da8d45b59e8c27de4bd072b392f5
109+
uses: docker/setup-buildx-action@6524bf65af31da8d45b59e8c27de4bd072b392f5 # v3.8.0
116110
- name: Login to GHCR
117-
uses: docker/login-action@9780b0c442fbb1117ed29e0efdff1e18412f7567
111+
uses: docker/login-action@9780b0c442fbb1117ed29e0efdff1e18412f7567 # v3.3.0
118112
with:
119113
registry: ghcr.io
120114
username: ${{ github.actor }}
121115
password: ${{ secrets.GITHUB_TOKEN }}
122116
- name: Build Docker images
123117
id: build
124-
uses: docker/build-push-action@48aba3b46d1b1fec4febb7c5d0c644b249a11355
118+
uses: docker/build-push-action@b32b51a8eda65d6793cd0494a773d4f6bcef32dc # v6.11.0
125119
with:
126120
# provenance: false is needed to avoid unkown/unknown os/arch on ghcr
127121
# see: https://github.com/docker/build-push-action/issues/820
@@ -132,7 +126,7 @@ jobs:
132126
BASE_IMAGE=${{ matrix.base-image }}
133127
tags: ${{ steps.metadata.outputs.tags }}
134128
labels: ${{ steps.metadata.outputs.labels }}
135-
- uses: actions/upload-artifact@v4
129+
- uses: actions/upload-artifact@65c4c4a1ddee5b72f698fdd19549f0f0fb45cf08 # v4.6.0
136130
with:
137131
name: ${{ steps.image-variables.outputs.tag }}
138132
path: ${{ steps.metadata.outputs.bake-file }}
@@ -152,18 +146,18 @@ jobs:
152146

153147
release:
154148
needs: [version, build]
155-
runs-on: ubuntu-22.04
149+
runs-on: ubuntu-latest
156150
permissions:
157151
contents: write
158152
if: needs.version.outputs.push == 'true'
159153
steps:
160-
- uses: actions/checkout@v4
154+
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
161155
- name: Push ${{ needs.version.outputs.new-version }} tag
162156
run: |
163157
git tag ${{ needs.version.outputs.new-version }}
164158
git push origin ${{ needs.version.outputs.new-version }}
165159
- name: Create release
166-
uses: softprops/action-gh-release@v2
160+
uses: softprops/action-gh-release@c95fe1489396fe8a9eb87c0abf8aa5b2ef267fda # v2.2.1
167161
with:
168162
generate_release_notes: true
169163
tag_name: ${{ needs.version.outputs.new-version }}

.github/workflows/bump.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ jobs:
1313
contents: write
1414
pull-requests: write
1515
steps:
16-
- uses: actions/checkout@v4
16+
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
1717

1818
- name: Assert latest pixi version is mentioned in README
1919
id: bump
@@ -27,7 +27,7 @@ jobs:
2727
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
2828

2929
- name: Create pull request
30-
uses: peter-evans/create-pull-request@67ccf781d68cd99b580ae25a5c18a1cc84ffff1f
30+
uses: peter-evans/create-pull-request@67ccf781d68cd99b580ae25a5c18a1cc84ffff1f # v7.6.0
3131
if: github.ref_name == 'main'
3232
with:
3333
token: ${{ secrets.GITHUB_TOKEN }}

README.md

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -15,10 +15,10 @@ docker pull ghcr.io/prefix-dev/pixi:latest
1515

1616
There are different tags for different base images available:
1717

18-
- `latest` - based on `ubuntu:jammy`
18+
- `latest` - based on `ubuntu:noble`
1919
- `focal` - based on `ubuntu:focal`
2020
- `bullseye` - based on `debian:bullseye`
21-
- `jammy-cuda-12.2.2` - based on `nvidia/cuda:12.2.2-jammy`
21+
- `noble-cuda-12.6.3` - based on `nvidia/cuda:12.6.3-ubuntu24.04`
2222
- ... and more
2323

2424
## Usage with shell-hook
@@ -27,7 +27,7 @@ The following example uses the pixi docker image as a base image for a multi-sta
2727
It also makes use of the `shell-hook` feature of pixi to define a convenient entry point (after executing the `shell-hook` script, the environment is activated.
2828

2929
```Dockerfile
30-
FROM ghcr.io/prefix-dev/pixi:0.18.0 AS build
30+
FROM ghcr.io/prefix-dev/pixi:0.40.0 AS build
3131

3232
# copy source code, pixi.toml and pixi.lock to the container
3333
COPY . /app
@@ -43,7 +43,7 @@ RUN pixi shell-hook -e prod > /shell-hook.sh
4343
# extend the shell-hook script to run the command passed to the container
4444
RUN echo 'exec "$@"' >> /shell-hook.sh
4545

46-
FROM ubuntu:22.04 AS production
46+
FROM ubuntu:24.04 AS production
4747

4848
# only copy the production environment into prod container
4949
# please note that the "prefix" (path) needs to stay the same as in the build container
@@ -65,17 +65,17 @@ There are images based on `ubuntu`, `debian` and `nvidia/cuda` available.
6565

6666
### Ubuntu
6767

68-
The `ubuntu:jammy` (22.04) based image is the default base image. It is used for the `latest` and `0.x.y` tag.
68+
The [`ubuntu:noble`](https://hub.docker.com/_/ubuntu) (24.04) based image is the default base image. It is used for the `latest` and `0.x.y` tag.
6969

70-
There are also images based on `ubuntu:focal` (20.04), `ubuntu:mantic` (23.10) and `ubuntu:noble` (24.04) available.
70+
There are also images based on `ubuntu:focal` (20.04), `ubuntu:jammy` (22.04), `ubuntu:oracular` (24.10) and `ubuntu:plucky` (25.04) available.
7171
These images use the tags `focal`, `0.x.y-focal`, ...
7272

7373
### Debian
7474

75-
Images based on `debian:bullseye`, `debian:bullseye-slim` (11), `debian:bookworm` and `debian:bookworm-slim` (12) are available.
75+
Images based on [`debian:bullseye`](https://hub.docker.com/_/debian), `debian:bullseye-slim` (11), `debian:bookworm` and `debian:bookworm-slim` (12) are available.
7676

7777
These images have the tags `bullseye`, `0.x.y-bullseye`, ...
7878

7979
### NVIDIA/CUDA
8080

81-
Images based on `nvidia/cuda` are available using the tags `cuda-<cuda-version>-jammy`, `cuda-<cuda-version>-focal`, `0.x.y-cuda-<cuda-version>-jammy`, ...
81+
Images based on [`nvidia/cuda`](https://hub.docker.com/r/nvidia/cuda) are available using the tags `cuda-<cuda-version>-jammy`, `cuda-<cuda-version>-focal`, `0.x.y-cuda-<cuda-version>-jammy`, ...

0 commit comments

Comments
 (0)