Skip to content

Instantly share code, notes, and snippets.

@maxandersen
Created September 8, 2021 22:09
Show Gist options
  • Save maxandersen/186d39a23806a8398f129f8c70578d3c to your computer and use it in GitHub Desktop.
Save maxandersen/186d39a23806a8398f129f8c70578d3c to your computer and use it in GitHub Desktop.

Below is a podman machine setup that works with Quarkus as of 2021-09-09.

It is using podman 3.3.1 installed via brew install podman and docker cli from brew install docker

Setup this environment:

export TMPDIR=~/podmantmp
export PM_SOCK=$TMPDIR/podman.sock
export DOCKER_HOST=unix://$PM_SOCK TESTCONTAINERS_CHECKS_DISABLE=true TESTCONTAINERS_RYUK_DISABLED=true

run this script:

podman machine init
podman machine start
# Docker style libs expect short names
podman machine ssh podman-machine-default sudo sed -i "'s/\(short-name-mode=\).*$/\1\"permissive\"/'" /etc/containers/registries.conf
podman system connection default podman-machine-default-root
# Ssh forward podman.sock (test containers and docker-java do not support ssh or podman style)
# have to be run in foreground to accept fingerprint
rm $PM_SOCK;`podman system connection list | grep root | awk '{print $3}' | gsed "s%://\([^:]*\):\([^/]*\)\(.*$\)% -L$PM_SOCK:\3 \1 -p \2 -N -i ~/.ssh/podman-machine-default%"` &

in separate terminal (with the env setup):

quarkus create -x jdbc-postgres,hibernate-orm getting-started
cd getting-started; quarkus dev
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment