10000 Add Ubuntu version-specific tags for Docker images by blink-so[bot] · Pull Request #301 · coder/images · GitHub
[go: up one dir, main page]

Skip to content

Add Ubuntu version-specific tags for Docker images #301

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 4 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Limit Ubuntu version support to 24.04 only
- Update build and push scripts to only support Ubuntu 24.04 (Noble)
- Keep extensible structure for future Ubuntu version support
- Add warning messages for unsupported Ubuntu versions
- Update README to reflect current Ubuntu 24.04 only support

Co-authored-by: matifali <10648092+matifali@users.noreply.github.com>
  • Loading branch information
blink-so[bot] and matifali committed Jun 13, 2025
commit 5b2a84a3e134a870f74312a1d9af81de13854629
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,12 +19,12 @@ under the `ubuntu` tag.

For Ubuntu-based images, additional version-specific tags are automatically created
to provide stability and prevent unexpected breaking changes when the base Ubuntu
version is updated:
version is updated.

Currently supported Ubuntu versions:

- `ubuntu-24.04` - Ubuntu 24.04 LTS (Noble Numbat)
- `ubuntu-noble` - Ubuntu Noble Numbat (24.04 LTS)
- `ubuntu-22.04` - Ubuntu 22.04 LTS (Jammy Jellyfish)
- `ubuntu-jammy` - Ubuntu Jammy Jellyfish (22.04 LTS)

Example usage:

Expand Down
30 changes: 8 additions & 22 deletions scripts/build_images.sh
Original file line number Diff line number Diff line change
Expand Up @@ -110,34 +110,20 @@ for image in "${IMAGES[@]}"; do
ubuntu_base=$(grep "^FROM ubuntu:" "$image_path" | head -1 | cut -d: -f2)
if [ -n "$ubuntu_base" ]; then
# Map Ubuntu codenames to version numbers
# Currently only Ubuntu 24.04 (Noble) is supported
case "$ubuntu_base" in
"noble")
ubuntu_version="24.04"
;;
"jammy")
ubuntu_version="22.04"
;;
"focal")
ubuntu_version="20.04"
"24.04")
ubuntu_version="24.04"
ubuntu_codename="noble"
;;
*)
# If it's already a version number, use it directly
if [[ "$ubuntu_base" =~ ^[0-9]+\.[0-9]+$ ]]; then
ubuntu_version="$ubuntu_base"
# Map version numbers to codenames
case "$ubuntu_version" in
"24.04")
ubuntu_codename="noble"
;;
"22.04")
ubuntu_codename="jammy"
;;
"20.04")
ubuntu_codename="focal"
;;
esac
else
ubuntu_version=""
# Unsupported Ubuntu version - skip version-specific tags
ubuntu_version=""
if [ $QUIET = false ]; then
echo "Warning: Ubuntu version '$ubuntu_base' not supported for version-specific tags. Only Ubuntu 24.04 (Noble) is currently supported." >&2
fi
;;
esac
Expand Down
30 changes: 8 additions & 22 deletions scripts/push_images.sh
Original file line number Diff line number Diff line change
Expand Up @@ -114,34 +114,20 @@ for image in "${IMAGES[@]}"; do
ubuntu_base=$(grep "^FROM ubuntu:" "$image_path" | head -1 | cut -d: -f2)
if [ -n "$ubuntu_base" ]; then
# Map Ubuntu codenames to version numbers
# Currently only Ubuntu 24.04 (Noble) is supported
case "$ubuntu_base" in
"noble")
ubuntu_version="24.04"
;;
"jammy")
ubuntu_version="22.04"
;;
"focal")
ubuntu_version="20.04"
"24.04")
ubuntu_version="24.04"
ubuntu_codename="noble"
;;
*)
# If it's already a version number, use it directly
if [[ "$ubuntu_base" =~ ^[0-9]+\.[0-9]+$ ]]; then
ubuntu_version="$ubuntu_base"
# Map version numbers to codenames
case "$ubuntu_version" in
"24.04")
ubuntu_codename="noble"
;;
"22.04")
ubuntu_codename="jammy"
;;
"20.04")
ubuntu_codename="focal"
;;
esac
else
ubuntu_version=""
# Unsupported Ubuntu version - skip version-specific tags
ubuntu_version=""
if [ $QUIET = false ]; then
echo "Warning: Ubuntu version '$ubuntu_base' not supported for version-specific tags. Only Ubuntu 24.04 (Noble) is currently supported." >&2
fi
;;
esac
Expand Down
Loading
0