Debian Extended, a Debian-based image with additional tools and optimizations for various use cases.
465
debian-ext is a lightweight Debian-based image that keeps the official Debian
base behavior and adds a small set of helper commands for package installation,
APT mirror switching, and optional build script execution.
Docker Hub image:
svcops/debian-ext:<tag>
| Tag | Base image |
|---|---|
11 | debian:11 |
bullseye | debian:bullseye |
12 | debian:12 |
bookworm | debian:bookworm |
13 | debian:13 |
trixie | debian:trixie |
This image copies the following helper commands into /usr/sbin:
| Command | Purpose |
|---|---|
install_packages | Installs APT packages non-interactively with retries and cache cleanup. |
uninstall_packages | Removes packages with apt-get autoremove --purge and cache cleanup. |
change_mirrors | Rewrites Debian APT source hosts to a supported mirror when applicable. |
run-script | Runs a shell script when it exists, with controlled failure behavior. |
The image does not start a service by default. Use it as a base image for your own images or as an interactive Debian environment with the helper commands available.
Run an interactive shell:
docker run --rm -it svcops/debian-ext:13 bash
Install packages in a running container:
install_packages ca-certificates curl wget
Switch APT sources to a mirror before installing packages:
change_mirrors aliyun
install_packages ca-certificates curl
FROM svcops/debian-ext:13
RUN change_mirrors tsinghua \
&& install_packages ca-certificates curl git
install_packages runs apt-get update, installs packages with
--no-install-recommends, retries transient APT failures, and removes APT cache
files after installation.
change_mirrors accepts one optional argument:
| Value | Mirror host |
|---|---|
tsinghua | mirrors.tuna.tsinghua.edu.cn |
aliyun | mirrors.aliyun.com |
If no argument is supplied, tsinghua is used.
The command updates /etc/apt/sources.list.d/debian.sources when that file is
present, replacing hosts that point to deb.debian.org or
security.debian.org. Images or Debian versions that use a different APT source
file layout may require manual source configuration.
run-script is useful in Dockerfiles where a customization script may or may
not be present:
run-script /docker-entrypoint-init.d/custom.sh
Arguments:
run-script <script> [exit_code] [fail_if_not_present]
exit_code defaults to 96 when the script exists but fails.fail_if_not_present defaults to n; use y to return 127 when the file
is missing.debian images.Content type
Image
Digest
sha256:f830af60f…
Size
47 MB
Last updated
3 months ago
docker pull svcops/debian-ext:trixie