This is a docker base image that can be used as a baseline for future containers that will be utilized for long-term deployments.
| Base Distribution | Tag | Size |
|---|---|---|
| Ubuntu Bionic (18) | ubuntu-18-latest | |
| Alpine 3.10 | alpine-3.10-latest | |
| Debian Bullseye (11) | debian-11-latest |
- /usr/local/bin
- log - This is used to print neat messages out to the docker console.
- Usage:
log $(basename $0) MESSAGE...
- Usage:
- pkg-manager - This is used by
inst-pkgandrm-pkgto get the package manager.- Usage:
. pkg-managerwhich then sets the$MANAGERenv variable in the calling script.
- Usage:
- inst-pkg - This is a install script which allows me to use common syntax across debian and alpine images. It's especially handy since apt-get doesn't include the nice
--virtualtag that apk does to easily install build dependencies not needed for further use.- Usage:
inst-pkg [--virtual NAME ] PKG [PKG...]
- Usage:
- rm-pkg - This is a remove script which allows me to use common syntax across debian and alpine images. It's especially handy since apt-get doesn't include the nice
--virtualtag that apk does to easily remove build dependencies not needed for further use.- Usage:
rm-pkg PKG [PKG...]
- Usage:
- check_and_terminate_process - Since Alpine Linux provides a minimal install and the s6-overlay doesn't provide a traditional method of verifying services this is a basic but powerful script I have written that is an all-in-one solution to find, terminate and possibly force kill processes. This utilizes the minimized pgrep provided by busybox in Alpine Linux.
- Usage:
check_and_terminate_process "name_of_service"
- Usage:
- log - This is used to print neat messages out to the docker console.
docker run \
--name=base-image \
-e PUID=1000 `Optional` \
-e PGID=1000 `Optional` \
-v </path/to/appdata/config>:/config \
--restart unless-stopped \
christopher102994/docker-base-image:alpine-3.10-latest
Container specific parameters passed at runtime. The format is <external>:<internal> (e.g. -p 443:22 maps the container's port 22 to the host's port 443).
| Parameter | Function |
|---|---|
| -e USERNAME | The Username you wish to run as. (Optional) |
| -e GROUPNAME | The Groupname you wish to run as. (Optional) |
| -e PUID | The UID you wish to run and save files as. (Optional) |
| -e PGID | The GID you wish to run and save files as. (Optional) |
| -v /config | All the config files for your app. |