Compare commits
4
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
593e623cff | ||
|
|
8f976e38e0 | ||
|
|
574c5cdbce | ||
|
|
69fc40651e |
@@ -1,10 +1,9 @@
|
|||||||
# baseimage
|
# baseimage
|
||||||
|
|
||||||
A fat Docker base image that trades size for build speed. Everything a
|
A fat Docker base image that trades size for build speed. Everything a
|
||||||
typical Go, Node, Python, or Hugo project needs is preinstalled, so child
|
typical Go, Node, Python, or Hugo project needs is preinstalled. Child
|
||||||
images only have to copy their source and build, instead of spending the
|
images only copy their source and build, without spending the first
|
||||||
first few minutes of every build on `apt-get install` and toolchain
|
minutes of every build on `apt-get install` and toolchain downloads.
|
||||||
downloads.
|
|
||||||
|
|
||||||
Image: `git.eeqj.de/sneak/baseimage`, built for `linux/amd64` and
|
Image: `git.eeqj.de/sneak/baseimage`, built for `linux/amd64` and
|
||||||
`linux/arm64`.
|
`linux/arm64`.
|
||||||
@@ -140,6 +139,9 @@ exec /usr/local/bin/myapp
|
|||||||
Services should log to stdout/stderr; the container's log is the combined
|
Services should log to stdout/stderr; the container's log is the combined
|
||||||
output of all services.
|
output of all services.
|
||||||
|
|
||||||
|
The image installs Valkey, PostgreSQL and nginx but never runs them; a child
|
||||||
|
image that wants one runs it as a service.
|
||||||
|
|
||||||
The image sets `CMD ["/usr/local/sbin/runsvinit"]` and no `ENTRYPOINT`, so
|
The image sets `CMD ["/usr/local/sbin/runsvinit"]` and no `ENTRYPOINT`, so
|
||||||
a child image that only needs one unsupervised process can override `CMD`
|
a child image that only needs one unsupervised process can override `CMD`
|
||||||
and ignore runit entirely, and `docker run -it image bash` works as
|
and ignore runit entirely, and `docker run -it image bash` works as
|
||||||
|
|||||||
@@ -34,9 +34,6 @@ docker run --rm "$img" bash -ec '
|
|||||||
bundle --version
|
bundle --version
|
||||||
valkey-server --version
|
valkey-server --version
|
||||||
valkey-cli --version
|
valkey-cli --version
|
||||||
valkey-server /etc/valkey/valkey.conf
|
|
||||||
valkey-cli ping
|
|
||||||
valkey-cli shutdown nosave
|
|
||||||
psql --version
|
psql --version
|
||||||
postgres --version
|
postgres --version
|
||||||
nginx -t
|
nginx -t
|
||||||
|
|||||||
@@ -146,8 +146,8 @@ rm -rf /usr/share/doc /usr/share/man /usr/share/info /usr/share/lintian
|
|||||||
find /usr/share/locale -mindepth 1 -maxdepth 1 ! -name 'en*' ! -name 'locale.alias' -exec rm -rf {} +
|
find /usr/share/locale -mindepth 1 -maxdepth 1 ! -name 'en*' ! -name 'locale.alias' -exec rm -rf {} +
|
||||||
rm -rf /root/.cache /root/.npm /root/.config /root/go /tmp/* /var/tmp/*
|
rm -rf /root/.cache /root/.npm /root/.config /root/go /tmp/* /var/tmp/*
|
||||||
|
|
||||||
# nginx and Valkey open their log files at startup; recreate the log
|
# Recreate the log directories the cleanup above removed, with their package
|
||||||
# directories the cleanup above removed, with their package owners.
|
# owners, so child images have them ready without recreating them at startup.
|
||||||
install -d -o root -g adm /var/log/nginx
|
install -d -o root -g adm /var/log/nginx
|
||||||
install -d -o valkey -g adm -m 2750 /var/log/valkey
|
install -d -o valkey -g adm -m 2750 /var/log/valkey
|
||||||
|
|
||||||
@@ -167,9 +167,6 @@ ruby --version
|
|||||||
bundle --version
|
bundle --version
|
||||||
valkey-server --version
|
valkey-server --version
|
||||||
valkey-cli --version
|
valkey-cli --version
|
||||||
valkey-server /etc/valkey/valkey.conf
|
|
||||||
valkey-cli ping
|
|
||||||
valkey-cli shutdown nosave
|
|
||||||
psql --version
|
psql --version
|
||||||
postgres --version
|
postgres --version
|
||||||
nginx -t
|
nginx -t
|
||||||
@@ -190,6 +187,7 @@ virtualenv --version
|
|||||||
test -x /usr/local/sbin/runsvinit
|
test -x /usr/local/sbin/runsvinit
|
||||||
test -d /etc/service
|
test -d /etc/service
|
||||||
|
|
||||||
# The checks above leave caches behind (node compile cache etc).
|
# The checks above leave caches and log files behind.
|
||||||
rm -rf /tmp/* /var/tmp/* /root/.cache /root/.npm /root/.config
|
rm -rf /tmp/* /var/tmp/* /root/.cache /root/.npm /root/.config
|
||||||
|
rm -f /var/log/nginx/*
|
||||||
rm -f "$0"
|
rm -f "$0"
|
||||||
|
|||||||
Reference in New Issue
Block a user