Commit Graph
22 Commits
Author SHA1 Message Date
Brennan KinneyandGitHub af57ec4659 docs: Docker - Minor corrections 2025-05-19 11:47:49 +12:00
Brennan KinneyandGitHub 5b899958ec chore: Dockerfile - Adopt HereDoc syntax 2025-05-19 11:47:15 +12:00
Brennan KinneyandGitHub ed02850e10 ci: Docker - Prefer dist-local stage 2025-05-12 22:51:00 +12:00
Brennan KinneyandGitHub 66a38e9a2e ci(fix): build-args list type is actually a whitepsace delimited string list 2025-05-12 22:42:18 +12:00
polarathene 7efd56d9b0 ci: docker-3.2.yml - Minor revisions
- Add note about `schedule` event trigger
- `BUILD_VERSION` => `GIT_BRANCH`
- `Dockerfile-alpine` => `Dockerfile.alpine`
- For GHCR username, prefer using `repository_owner` from workflow context which is correct vs `actor` which could be any user capable of triggering the workflow at the repo (which may not align with the expected GHCR username.
2025-05-12 10:57:28 +12:00
Brennan Kinney 324ec443db docs: Revise Dockerfile.md
- Use GH alerts for displaying notes
- Relative links to `Dockerfile`s
- `Dockerfile-alpine` => `Dockerfile.alpine`
2025-05-12 10:57:28 +12:00
Brennan KinneyandGitHub 46896fb8b1 chore: Rename Dockerfile-alpine to Dockerfile.alpine 2025-05-12 10:43:49 +12:00
Brennan KinneyandGitHub bf895807f5 docs: Revise Dockerfile instructions 2025-05-06 17:26:56 +12:00
Brennan KinneyandGitHub c1346f2032 chore: Update Dockerfile-alpine 2025-05-06 16:32:24 +12:00
Brennan KinneyandGitHub 312f326734 ci: Dockerfile - Support local and git builds with Leap image 2025-05-06 16:00:06 +12:00
Brennan KinneyandGitHub 0b4b2d9ffc chore: Dockerfile.git - Remove apk update 2025-05-01 14:54:58 +12:00
Brennan KinneyandGitHub e0c3502676 refactor: Docker (Alpine) improvements
60MB => 38MB (dist-git) or 30MB (dist-local)
2025-05-01 14:42:21 +12:00
Brennan Kinney 6af0a801ec chore: Bring back ZYPPER_OPTIONS 2023-03-22 22:56:59 +13:00
Brennan Kinney 1212ad8e59 refactor: Support syntax without BuildKit features
These have been available via opt-in prior to v23 of Docker Engine with `DOCKER_BUILDKIT=1` ENV as a prefix to running `docker build`, however it's been requested to avoid the syntax.

No HereDoc (multi-line RUN with EOF marker) or `RUN --mount` available. This makes the `busybox` approach a hassle, so I've brought back the explicit creation of user and home dir.

Without the cache mounts, bring back `zypper clean`. It's not doing much as the `--cache-dir` is still set, but should reduce disk space for the `builder` layer. Local builds will be slower as a result when this layer is invalidated.

AFAIK, this also makes it tricky to use the `ZYPPER_OPTIONS`? So no longer DRY.
2023-03-22 22:16:28 +13:00
Brennan Kinney 718eb3461c chore: Revise Dockerfile
- Removing bulk of the noise from inline documentation.
- Packages bundled into single line like previous the Alpine version had.
- `CACHE_ZYPPER` is only used as an `ARG` in the `builder` stage.
- `zypper clean` wasn't able to clear anything from the install root, other than the `CACHE_ZYPPER` mount.
2023-03-22 21:31:34 +13:00
Brennan Kinney 0b86094ab9 fix: WORKDIR before adduser avoids surprises
The additions from `adduser` reading `/etc` does not appear to apply if the directory already exists, and permissions (including SGID) are adjusted properly for the home dir.

This mean the excess backup copies in `/etc` are introduced again however.
2023-03-22 21:19:05 +13:00
Brennan Kinney 48c180d0d8 fix: Manually create testssl user and home
BusyBox `adduser` was reading config from `/etc` that unnecessarily populates the home folder with various dot files.

Alternative approach is to create the user and home folder manually. This avoids some extra files like the `-` suffixed backup copies from `adduser`.
2023-03-22 21:19:05 +13:00
Brennan Kinney 1392987f01 refactor: Change base image from alpine:3.17 to opensuse/leap:15.4 2023-03-22 21:19:05 +13:00
Brennan KinneyandGitHub 81634ce13d chore: Bring back group value for COPY --chown 2023-02-07 21:36:47 +13:00
Brennan Kinney 76b8f0c981 chore: Remove redundant mkdir
- If local folder ownership is for example `644` it will fail to handle the `COPY` regardless (while `744` would work).
- Creating the directory with higher permissions in the container does not appear to help.
2023-02-02 14:26:16 +13:00
Brennan Kinney dc7d13b853 chore(Dockerfile): Simplify testssl user creation
Create `testssl` user (_and group_) with no password (`-D`) and default their shell to bash (`-s`):
- A group will implicitly be created with the same value as the user. `addgroup testssl` and `-G testssl` are not needed.
- Gecos data (`-g "testssl user"`) doesn't appear relevant to the project to be required? The default gecos value (`Linux User,,,`) should be fine.
2023-02-02 14:07:51 +13:00
Brennan Kinney 74892e45c5 chore: Use a single COPY by better leveraging .dockerignore patterns 2023-02-02 12:49:30 +13:00