Sign inSign up

svcops/debian-ext

By svcops

•Updated 3 months ago

Debian Extended, a Debian-based image with additional tools and optimizations for various use cases.

Image
0

465

svcops/debian-ext repository overview

⁠svcops/debian-ext

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>

⁠Supported Tags

TagBase image
11debian:11
bullseyedebian:bullseye
12debian:12
bookwormdebian:bookworm
13debian:13
trixiedebian:trixie

⁠What Is Included

This image copies the following helper commands into /usr/sbin:

CommandPurpose
install_packagesInstalls APT packages non-interactively with retries and cache cleanup.
uninstall_packagesRemoves packages with apt-get autoremove --purge and cache cleanup.
change_mirrorsRewrites Debian APT source hosts to a supported mirror when applicable.
run-scriptRuns 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.

⁠Quick Start

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

⁠Use As A Base Image

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.

⁠Mirror Switching

change_mirrors accepts one optional argument:

ValueMirror host
tsinghuamirrors.tuna.tsinghua.edu.cn
aliyunmirrors.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.

⁠Optional Script Execution

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.

⁠Notes

  • Built from the official debian images.
  • Intended for derived images that need repeatable APT package operations.
  • No additional application runtime, entrypoint, or exposed port is configured.

Tag summary

Content type

Image

Digest

sha256:f830af60f…

Size

47 MB

Last updated

3 months ago

docker pull svcops/debian-ext:trixie