Commit Graph

39 Commits

Author SHA1 Message Date
Dirk Wetter 781757f086
polish phrasing 2023-10-13 17:32:35 +02:00
Dirk f39564d843 Make sure util_Linux gets replaced as intended
There were some discussions in #2420 whether the zypper install
commend worked as intended. While there's liitle doubt that those
packages weren't installed this PR makes really sure that this is the case.

Also it does an update via ``zypper up`` as the image provided from
dockerhub seemed to be somewhat behind.
2023-10-13 17:07:38 +02:00
Dirk dda89c629e Upgrade to leap 15.5 2023-10-13 10:36:05 +02:00
Dirk Wetter f0e1540bc6 add comment wrt #2403 2023-10-03 18:09:58 +02:00
Dirk Wetter 8a1e90767b add busybox link to tar
See #2403
2023-10-03 15:00:04 +02: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
Dirk Wetter 8260ca16e2
Merge pull request #2309 from polarathene/chore/dockerfile-improved-copy
chore: Use a single `COPY` by better leveraging `.dockerignore` patterns
2023-02-07 12:23:04 +01:00
Dirk Wetter f914423978
Remove mkdir in Dockerfile
see https://github.com/drwetter/testssl.sh/pull/2312#pullrequestreview-1286620850
2023-02-07 10:28:26 +01:00
Brennan Kinney 81634ce13d
chore: Bring back group value for `COPY --chown` 2023-02-07 21:36:47 +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
Dirk Wetter beb94d9efc Upgrade Alpine version for both Dockerfiles
... to improve/mitigate performance problems, see #2299.
(musl libc vs. glibc)
2023-02-01 19:40:40 +01:00
Dirk Wetter abb8f82d85
Upgrade Alpine version to the latest stable
3.16.
2022-08-22 16:31:59 +02:00
a1346054 b1f5c6c9af Trim excess whitespace 2021-09-04 13:28:30 +00:00
Dirk Wetter 68c5acb556
Upgrade to alpine 3.13 2021-07-30 18:01:12 +02:00
Dirk Wetter 15ace79a4c
Merge pull request #1722 from vitaliytv/patch-1
upd alpine to 3.12
2021-05-15 12:27:41 +02:00
vin01 5e062087f9
Add xxd to docker image
xxd is not a strict requirement and a fallback logic exists to handle its absence. However it is in general more performant and helpful in debugging as well which is desirable in many situations like ci/cd pipelines. See commit 3756cdc for details
2021-04-01 09:07:44 +02:00
Dirk Wetter 7c66535628 resolve merge conflict 2020-12-29 13:44:04 +01:00
Vitalii Tverdokhlib 6fe8764f8d
upd alpine to 3.12
because error with libuv required for other packages. For example: 
Error relocating /usr/bin/node: uv_fs_lutime
2020-09-12 18:04:33 +03:00
Dirk Wetter 4a167f6ac5 Add openssl 1.1.1g into alpine docker image for STARTTLS injection 2020-09-02 17:44:11 +02:00
Dirk Wetter af5cad9183 Additions to find_openssl_binary() for a new openssl version / cleanup()
This is a small cleanup of find_openssl_binary(). It tries also
to find a newer openssl version which we could need for any
new features. As stated in the comment at some point we should
decide whether we stick with our old version or rather supply
a new one. (xmpp-server is also not builtin for our 1.0.2) or
maybe find a good way (code) how to use both.

Also it looks for socat and if found it populates the according
global var.

It does a minor resort of global vars in the beginning.
2020-08-24 16:22:04 +02:00
Dirk d065bda3b8 Better Dockerfile: doesn't require "git clone"
.. see also #1559.

It "mkdirs" the needed etc and bin directories first, then copies
stuff over. It also reduces a few layers.

Also it corrects a mistake in the Readme.md (docker exec --> run)

Thanks for the discussion @Alex131089
2020-05-09 13:17:02 +02:00
Vitalii Tverdokhlib fbc2661fbe
Dockerfile: Alpine 3.11 2020-01-02 13:52:30 +02:00
Dirk Wetter 2cf8997635
Upgrade to Alpine 3.10 2019-12-03 23:10:06 +01:00
Dirk Wetter c163f3ec99
simplify Dockerfile
.. according to  #1402 and #1142
2019-12-03 12:05:07 +01:00
Dirk Wetter 7818f1acc8
Add idn support 2019-09-19 07:12:59 +00:00
Dirk Wetter e4a08b3ed5 Use specific Alpine version
... and not latest which is unspecific. Atm
it's the same
2019-04-17 08:08:12 +02:00
Dirk a66f5cfdbc curl added for --phone-out checks 2018-09-04 20:20:09 +02:00
Dirk d1f0380173 add coreutils to provide full date command 2018-02-08 21:50:20 +01:00
Dirk cbe38cc4bb convert Dockerfile to alpine linux 2018-02-08 21:06:19 +01:00
Dirk c7a0de1280 fixed missing ps
and removed additional packages for dns clients
2017-11-16 21:16:06 +01:00
Christian Dresen 2211a23bf0 Added Dockerfile.md, modified Dockerfile: pull with depth=1, default-cmd: --help 2017-03-30 14:41:46 +02:00
Christian Dresen c366f09043 Removed unused lines from Dockerfile for testssl.sh 2017-03-30 13:35:48 +02:00
Christian Dresen db32b1fbea Added Dockerfile for testssl.sh 2017-03-30 13:18:46 +02:00