Docker Container using Nix that uses a custom CA chain.
gomod2nix
nix build
nix run
nix develop
nix build .#docker-image
Once you've built the image, you can load it into a local Docker daemon with docker load
.
docker load < result
interactive: true
Check that you can access CA certificate sites, e.g. https://google.com
, plus the local server at https://localhost:8443
.
docker run -it --rm --net=host app:latest
This will serve a the current directory over HTTPS. The CA of ca-chain.cert.pem
wont be trusted automatically, it will need to be merged with the system CA store.
serve -crt="localhost.cert.pem" -key="localhost.key.pem" -dir=www -addr=0.0.0.0:8443