kroki
kroki copied to clipboard
WIP: Build server inside Dockerfile
resolves #1481
:thinking: works on my machine with
podman build \
--ulimit="nofile=65535:65535" \
--runtime runc \
-f ops/docker/jdk11-jammy/Dockerfile \
--build-context nomnoml="./nomnoml" \
--build-context vega="./vega" \
--build-context dbml="./dbml" \
--build-context wavedrom="./wavedrom" \
--build-context bytefield="./bytefield" \
--build-context kroki-src="." \
server
Tests related to sockets are failing in the container. Not sure exactly why but it says:
java.net.SocketException: Protocol family unavailable
Might be related to IPv6 not working as excepted with Docker m. Someone suggested to add -Djava.net.preferIPv4Stack=true -Djava.net.preferIPv4Addresses=true
option to the JVM.
You can probably try to add these options on the surefire plugin using: https://maven.apache.org/surefire/maven-surefire-plugin/test-mojo.html#argLine
But the test ask for IPv6
https://github.com/copyrights/kroki/blob/16aff966b0d82de953bb4609f390757cd4bd6f27/server/src/test/java/io/kroki/server/ServerListenTest.java#L69
Ok I just did the test locally with docker buildx bake kroki
and it fails at the IPv6 test as well.
Then I changed my /etc/docker/daemon.json
to
{
"ipv6": true,
"fixed-cidr-v6": "2001:db8:1::/64"
}
and systemctl restart docker
. Now the build works fine. Maybe related to actions/runner-images/issues/668
with buildah IPv6 would work https://github.com/copyrights/kroki/actions/runs/4547648299/jobs/8017796575#step:4:554
@copyrights are you still working on it? since we made quite a few changes you will need to rebase on the main branch.
It seems the issue in github actions is closed. But I'll have to rebase to test it. I'll give it a shot.
Nope, still no IPv6 support inside the github action. Otherwise the rebased version builds fine on systems with IPv6 enabled.