Add nginx (closes #11)
Install nginx from apt and check nginx -t in the smoke test. Model: deepseek-v4-pro
This commit was merged in pull request #13.
This commit is contained in:
@@ -11,45 +11,46 @@ Image: `git.eeqj.de/sneak/baseimage`, built for `linux/amd64` and
|
|||||||
|
|
||||||
## What is in it
|
## What is in it
|
||||||
|
|
||||||
| Component | Source | Location |
|
| Component | Source | Location |
|
||||||
| --------------- | ------------------------------ | ------------------------------ |
|
| ------------------- | ------------------------------------------ | ------------------------------------------------ |
|
||||||
| Ubuntu 26.04 | `ubuntu:26.04`, fully upgraded | `/` |
|
| Ubuntu 26.04 | `ubuntu:26.04`, fully upgraded | `/` |
|
||||||
| init | `runsvinit` (built from Go) | `/usr/local/sbin/runsvinit` |
|
| init | `runsvinit` (built from Go) | `/usr/local/sbin/runsvinit` |
|
||||||
| services | `runit` (apt) | `/etc/sv`, `/etc/service` |
|
| services | `runit` (apt) | `/etc/sv`, `/etc/service` |
|
||||||
| build-essential | apt | `gcc`, `make`, `pkg-config` |
|
| build-essential | apt | `gcc`, `make`, `pkg-config` |
|
||||||
| Go (distro) | apt `golang-go` | `/usr/lib/go-*` |
|
| Go (distro) | apt `golang-go` | `/usr/lib/go-*` |
|
||||||
| Go (latest) | go.dev tarball | `/usr/local/go` |
|
| Go (latest) | go.dev tarball | `/usr/local/go` |
|
||||||
| golangci-lint | GitHub release | `/usr/local/bin/golangci-lint` |
|
| golangci-lint | GitHub release | `/usr/local/bin/golangci-lint` |
|
||||||
| shellcheck | apt | `/usr/bin/shellcheck` |
|
| shellcheck | apt | `/usr/bin/shellcheck` |
|
||||||
| govulncheck | `go install` (latest) | `/usr/local/bin/govulncheck` |
|
| govulncheck | `go install` (latest) | `/usr/local/bin/govulncheck` |
|
||||||
| Hugo (extended) | GitHub release `.deb` | `/usr/local/bin/hugo` |
|
| Hugo (extended) | GitHub release `.deb` | `/usr/local/bin/hugo` |
|
||||||
| Node (distro) | apt `nodejs`, `npm` | `/usr/bin/node` |
|
| Node (distro) | apt `nodejs`, `npm` | `/usr/bin/node` |
|
||||||
| nvm | git tag | `/usr/local/nvm` |
|
| nvm | git tag | `/usr/local/nvm` |
|
||||||
| Node (LTS) | `nvm install --lts` | `/usr/local/nvm/current` |
|
| Node (LTS) | `nvm install --lts` | `/usr/local/nvm/current` |
|
||||||
| corepack | `npm install -g corepack` | nvm LTS global bin |
|
| corepack | `npm install -g corepack` | nvm LTS global bin |
|
||||||
| yarn, pnpm | corepack, cache pre-populated | `/usr/local/corepack` |
|
| yarn, pnpm | corepack, cache pre-populated | `/usr/local/corepack` |
|
||||||
| wrangler | `npm install -g wrangler` | nvm LTS global bin |
|
| wrangler | `npm install -g wrangler` | nvm LTS global bin |
|
||||||
| prettier | `npm install -g prettier` | nvm LTS global bin |
|
| prettier | `npm install -g prettier` | nvm LTS global bin |
|
||||||
| Playwright | `npm install -g playwright` | nvm LTS global bin |
|
| Playwright | `npm install -g playwright` | nvm LTS global bin |
|
||||||
| Playwright browsers | `playwright install` (chromium, firefox) | `/ms-playwright` |
|
| Playwright browsers | `playwright install` (chromium, firefox) | `/ms-playwright` |
|
||||||
| Firefox | Mozilla apt repo | `/usr/bin/firefox` |
|
| Firefox | Mozilla apt repo | `/usr/bin/firefox` |
|
||||||
| geckodriver | GitHub release | `/usr/local/bin/geckodriver` |
|
| geckodriver | GitHub release | `/usr/local/bin/geckodriver` |
|
||||||
| headless Chrome | Playwright Chromium | `chromium` on `PATH` |
|
| headless Chrome | Playwright Chromium | `chromium` on `PATH` |
|
||||||
| Python (distro) | apt `python3`, `pip`, `venv` | `/usr/bin/python3` |
|
| Python (distro) | apt `python3`, `pip`, `venv` | `/usr/bin/python3` |
|
||||||
| pyenv | git tag | `/usr/local/pyenv` |
|
| pyenv | git tag | `/usr/local/pyenv` |
|
||||||
| Python (latest) | `pyenv install` | `/usr/local/pyenv/versions/*` |
|
| Python (latest) | `pyenv install` | `/usr/local/pyenv/versions/*` |
|
||||||
| virtualenv | apt, and pip in pyenv Python | `virtualenv` on `PATH` |
|
| virtualenv | apt, and pip in pyenv Python | `virtualenv` on `PATH` |
|
||||||
| tzdata | apt | `/usr/share/zoneinfo` |
|
| tzdata | apt | `/usr/share/zoneinfo` |
|
||||||
| zstd | apt | `/usr/bin/zstd` |
|
| zstd | apt | `/usr/bin/zstd` |
|
||||||
| sqlite3 (CLI) | apt | `/usr/bin/sqlite3` |
|
| sqlite3 (CLI) | apt | `/usr/bin/sqlite3` |
|
||||||
| libvips | apt `libvips-dev`, `libvips-tools` | `vips` on `PATH` |
|
| libvips | apt `libvips-dev`, `libvips-tools` | `vips` on `PATH` |
|
||||||
| libheif | apt `libheif-dev`, `libheif-plugin-aomenc` | HEIF/AVIF codec |
|
| libheif | apt `libheif-dev`, `libheif-plugin-aomenc` | HEIF/AVIF codec |
|
||||||
| ImageMagick | apt | `magick` |
|
| ImageMagick | apt | `magick` |
|
||||||
| Ghostscript | apt | `gs` |
|
| Ghostscript | apt | `gs` |
|
||||||
| Ruby | apt `ruby`, `ruby-dev` | `/usr/bin/ruby` |
|
| Ruby | apt `ruby`, `ruby-dev` | `/usr/bin/ruby` |
|
||||||
| Bundler | apt `bundler` | `bundle` on `PATH` |
|
| Bundler | apt `bundler` | `bundle` on `PATH` |
|
||||||
| Valkey | apt `valkey-server`, `valkey-tools` | `valkey-server`, `valkey-cli` |
|
| Valkey | apt `valkey-server`, `valkey-tools` | `valkey-server`, `valkey-cli` |
|
||||||
| PostgreSQL | apt `postgresql` | `psql`, `postgres`, `initdb`, `pg_ctl` on `PATH` |
|
| PostgreSQL | apt `postgresql` | `psql`, `postgres`, `initdb`, `pg_ctl` on `PATH` |
|
||||||
|
| nginx | apt | `/usr/sbin/nginx` |
|
||||||
|
|
||||||
Plus the usual odds and ends: `git`, `curl`, `wget`, `jq`, `rsync`,
|
Plus the usual odds and ends: `git`, `curl`, `wget`, `jq`, `rsync`,
|
||||||
`openssh-client`, `zip`/`unzip`, `xz-utils`, `bzip2`, and the `-dev`
|
`openssh-client`, `zip`/`unzip`, `xz-utils`, `bzip2`, and the `-dev`
|
||||||
@@ -201,8 +202,8 @@ Every unpinned version is resolved at build time, so a rebuild picks up
|
|||||||
current packages and tool releases. Rebuild and retag periodically; child
|
current packages and tool releases. Rebuild and retag periodically; child
|
||||||
images get everything new on their next build.
|
images get everything new on their next build.
|
||||||
|
|
||||||
The registry sits behind Traefik. The large `RUN` layer (about 650MB
|
The registry sits behind Traefik. The large `RUN` layer (about 1.63 GB
|
||||||
compressed, over 2GB uncompressed) needs the entrypoint
|
compressed, 4.3 GB on disk) needs the entrypoint
|
||||||
`respondingTimeouts` raised from Traefik's 60 second default, or the final
|
`respondingTimeouts` raised from Traefik's 60 second default, or the final
|
||||||
blob commit fails with a 499 or 500 and docker re-uploads the layer.
|
blob commit fails with a 499 or 500 and docker re-uploads the layer.
|
||||||
|
|
||||||
@@ -217,7 +218,7 @@ Interactive shells (login shells, or anything that sources
|
|||||||
`commit-logs`, `clean`, plus `lib.sh` (shared setup) and `native-arch`.
|
`commit-logs`, `clean`, plus `lib.sh` (shared setup) and `native-arch`.
|
||||||
- `Dockerfile` — base, environment, one `COPY`, one `ADD`, one `RUN`.
|
- `Dockerfile` — base, environment, one `COPY`, one `ADD`, one `RUN`.
|
||||||
- `build.sh` — everything the `RUN` does, in order: apt, Go, runsvinit,
|
- `build.sh` — everything the `RUN` does, in order: apt, Go, runsvinit,
|
||||||
golangci-lint, Hugo, nvm/Node/corepack/wrangler, pyenv/Python, cleanup,
|
golangci-lint, govulncheck, Hugo, nvm/Node/corepack/wrangler, browsers,
|
||||||
sanity checks. Removes itself when done.
|
pyenv/Python, cleanup, sanity checks. Removes itself when done.
|
||||||
- `rootfs/` — files copied verbatim onto `/` before `build.sh` runs.
|
- `rootfs/` — files copied verbatim onto `/` before `build.sh` runs.
|
||||||
- `logs/YYYY-MM-DD/` — build logs for each released image, per arch.
|
- `logs/YYYY-MM-DD/` — build logs for each released image, per arch.
|
||||||
|
|||||||
@@ -39,6 +39,7 @@ docker run --rm "$img" bash -ec '
|
|||||||
valkey-cli shutdown nosave
|
valkey-cli shutdown nosave
|
||||||
psql --version
|
psql --version
|
||||||
postgres --version
|
postgres --version
|
||||||
|
nginx -t
|
||||||
playwright --version
|
playwright --version
|
||||||
firefox --version
|
firefox --version
|
||||||
geckodriver --version
|
geckodriver --version
|
||||||
|
|||||||
@@ -32,7 +32,8 @@ apt-get -y install --no-install-recommends \
|
|||||||
libvips-dev libvips-tools libheif-dev libheif-plugin-aomenc \
|
libvips-dev libvips-tools libheif-dev libheif-plugin-aomenc \
|
||||||
imagemagick ghostscript \
|
imagemagick ghostscript \
|
||||||
ruby ruby-dev bundler \
|
ruby ruby-dev bundler \
|
||||||
valkey-server valkey-tools postgresql
|
valkey-server valkey-tools postgresql \
|
||||||
|
nginx
|
||||||
|
|
||||||
# Link the PostgreSQL server binaries onto PATH. They live under a versioned
|
# Link the PostgreSQL server binaries onto PATH. They live under a versioned
|
||||||
# directory (/usr/lib/postgresql/*/bin); the client psql is already on PATH.
|
# directory (/usr/lib/postgresql/*/bin); the client psql is already on PATH.
|
||||||
@@ -145,8 +146,9 @@ 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/*
|
||||||
|
|
||||||
# Valkey opens its log file at startup; recreate the log directory the
|
# nginx and Valkey open their log files at startup; recreate the log
|
||||||
# cleanup above removed, with its package owner.
|
# directories the cleanup above removed, with their package owners.
|
||||||
|
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
|
||||||
|
|
||||||
# --- sanity ------------------------------------------------------------------
|
# --- sanity ------------------------------------------------------------------
|
||||||
@@ -170,6 +172,7 @@ ok=; for i in $(seq 1 50); do if valkey-cli ping 2>/dev/null | grep -q PONG; the
|
|||||||
valkey-cli shutdown nosave
|
valkey-cli shutdown nosave
|
||||||
psql --version
|
psql --version
|
||||||
postgres --version
|
postgres --version
|
||||||
|
nginx -t
|
||||||
hugo version
|
hugo version
|
||||||
node --version
|
node --version
|
||||||
npm --version
|
npm --version
|
||||||
@@ -190,5 +193,6 @@ test -d /etc/service
|
|||||||
# The checks above leave caches and log files behind.
|
# 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/valkey/*
|
rm -f /var/log/valkey/*
|
||||||
|
rm -f /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
|
||||||
rm -f "$0"
|
rm -f "$0"
|
||||||
|
|||||||
Reference in New Issue
Block a user