Skip to content

Commit c876e21

Browse files
committed
chore(base): upgrade to bookworm
1 parent 681b39e commit c876e21

16 files changed

Lines changed: 217 additions & 5 deletions

File tree

.woodpecker/manifest.tmpl

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
image: registry.drycc.cc/drycc/{{project}}:bullseye
1+
image: registry.drycc.cc/drycc/{{project}}:bookworm
22
{{#if build.tags}}
33
tags:
44
{{#each build.tags}}
@@ -7,12 +7,12 @@ tags:
77
{{/if}}
88
manifests:
99
-
10-
image: registry.drycc.cc/drycc/{{project}}:bullseye-amd64
10+
image: registry.drycc.cc/drycc/{{project}}:bookworm-amd64
1111
platform:
1212
architecture: amd64
1313
os: linux
1414
-
15-
image: registry.drycc.cc/drycc/{{project}}:bullseye-arm64
15+
image: registry.drycc.cc/drycc/{{project}}:bookworm-arm64
1616
platform:
1717
architecture: arm64
1818
os: linux

Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
CODENAME ?= bullseye
1+
CODENAME ?= bookworm
22
DEV_REGISTRY ?= registry.drycc.cc
33
DRYCC_REGISTRY ?= ${DEV_REGISTRY}
44
IMAGE = "${DRYCC_REGISTRY}"/drycc/base:"${CODENAME}"-"$(shell dpkg --print-architecture)"

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ A slimmed-down Debian-based container image used as the basis of [Drycc Workflow
99
Start your Dockerfile with this line:
1010

1111
```
12-
FROM registry.drycc.cc/drycc/base:bullseye
12+
FROM registry.drycc.cc/drycc/base:bookworm
1313
```
1414

1515
There isn't a `:latest` tag, because each debian version is a tag.
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
# Retry apt failures 3 times. See here for more information: https://linux.die.net/man/5/apt.conf
2+
Acquire::Retries 3;
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
# Since Docker users are looking for the smallest possible final images, the
2+
# following emerges as a very common pattern:
3+
4+
# RUN apt-get update \
5+
# && apt-get install -y <packages> \
6+
# && <do some compilation work> \
7+
# && apt-get purge -y --auto-remove <packages>
8+
9+
# By default, APT will actually _keep_ packages installed via Recommends or
10+
# Depends if another package Suggests them, even and including if the package
11+
# that originally caused them to be installed is removed. Setting this to
12+
# "false" ensures that APT is appropriately aggressive about removing the
13+
# packages it added.
14+
15+
# https://aptitude.alioth.debian.org/doc/en/ch02s05s05.html#configApt-AutoRemove-SuggestsImportant
16+
Apt::AutoRemove::SuggestsImportant "false";
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
# Since for most Docker users, package installs happen in "docker build" steps,
2+
# they essentially become individual layers due to the way Docker handles
3+
# layering, especially using CoW filesystems. What this means for us is that
4+
# the caches that APT keeps end up just wasting space in those layers, making
5+
# our layers unnecessarily large (especially since we'll normally never use
6+
# these caches again and will instead just "docker build" again and make a brand
7+
# new image).
8+
9+
# Ideally, these would just be invoking "apt-get clean", but in our testing,
10+
# that ended up being cyclic and we got stuck on APT's lock, so we get this fun
11+
# creation that's essentially just "apt-get clean".
12+
DPkg::Post-Invoke { "rm -f /var/cache/apt/archives/*.deb /var/cache/apt/archives/partial/*.deb /var/cache/apt/*.bin || true"; };
13+
APT::Update::Post-Invoke { "rm -f /var/cache/apt/archives/*.deb /var/cache/apt/archives/partial/*.deb /var/cache/apt/*.bin || true"; };
14+
15+
Dir::Cache::pkgcache "";
16+
Dir::Cache::srcpkgcache "";
17+
18+
# Note that we do realize this isn't the ideal way to do this, and are always
19+
# open to better suggestions (https://github.com/docker/docker/issues).
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
# Since Docker users using "RUN apt-get update && apt-get install -y ..." in
2+
# their Dockerfiles don't go delete the lists files afterwards, we want them to
3+
# be as small as possible on-disk, so we explicitly request "gz" versions and
4+
# tell Apt to keep them gzipped on-disk.
5+
6+
# For comparison, an "apt-get update" layer without this on a pristine
7+
# "debian:wheezy" base image was "29.88 MB", where with this it was only
8+
# "8.273 MB".
9+
10+
Acquire::GzipIndexes "true";
11+
Acquire::CompressionTypes::Order:: "gz";
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
# In Docker, we don't often need the "Translations" files, so we're just wasting
2+
# time and space by downloading them, and this inhibits that. For users that do
3+
# need them, it's a simple matter to delete this file and "apt-get update". :)
4+
5+
Acquire::Languages "none";
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
793274e99ef692a48f77ea0eea7bd0cb
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
nameserver 8.8.8.8
2+
nameserver 8.8.4.4

0 commit comments

Comments
 (0)