From edc9fd8384ff7e0f2d0f9279c3ff4da66632840f Mon Sep 17 00:00:00 2001 From: Eli Ribble Date: Thu, 14 May 2026 15:46:06 +0000 Subject: [PATCH] Switch from docker to podman Far less invasive, needs fewer permissions, etc. --- flake.nix | 1 + tests/Makefile | 14 +++++++------- tests/docker-compose.yaml | 8 ++++---- 3 files changed, 12 insertions(+), 11 deletions(-) diff --git a/flake.nix b/flake.nix index 5ea4ecf..824f7fd 100644 --- a/flake.nix +++ b/flake.nix @@ -20,6 +20,7 @@ buildInputs = [ pkgs.go pkgs.lefthook + pkgs.podman-compose ]; }; } diff --git a/tests/Makefile b/tests/Makefile index 23a9e6b..c3b9759 100644 --- a/tests/Makefile +++ b/tests/Makefile @@ -1,6 +1,6 @@ -setup: checkout-testdata docker-compose-up +setup: checkout-testdata podman-compose-up # checkout-testdata will checkout testdata from separate repository into git submodule. checkout-testdata: @@ -10,11 +10,11 @@ checkout-testdata: checkout-latest-testdata: checkout-testdata cd ./testdata && git fetch && git checkout master && git pull -# docker-compose-up will download docker image for each of the databases listed in docker-compose.yaml file, and then it will initialize +# podman-compose-up will download podman image for each of the databases listed in podman-compose.yaml file, and then it will initialize # database with testdata retrieved in previous step. -# On the first run this action might take couple of minutes. Docker temp data are stored in .docker directory. -docker-compose-up: - docker compose up +# On the first run this action might take couple of minutes. Podman temp data are stored in .podman directory. +podman-compose-up: + podman compose up init-all: go run ./init/init.go -testsuite all @@ -73,6 +73,6 @@ jet-gen-cockroach: jet -dsn=postgres://jet:jet@localhost:26257/jetdb?sslmode=disable -schema=northwind -path=./.gentestdata/ jet -dsn=postgres://jet:jet@localhost:26257/jetdb?sslmode=disable -schema=test_sample -path=./.gentestdata/ -# docker-compose-cleanup will stop and remove test containers, volumes, and images. +# podman-compose-cleanup will stop and remove test containers, volumes, and images. cleanup: - docker compose down --volumes + podman compose down --volumes diff --git a/tests/docker-compose.yaml b/tests/docker-compose.yaml index 6375cc4..d1a3436 100644 --- a/tests/docker-compose.yaml +++ b/tests/docker-compose.yaml @@ -1,6 +1,6 @@ services: postgres: - image: postgres:14.1 + image: docker.io/library/postgres:14.1 restart: always environment: - POSTGRES_USER=jet @@ -12,7 +12,7 @@ services: - ./testdata/init/postgres:/docker-entrypoint-initdb.d mysql: - image: mysql/mysql-server:8.0.27 + image: docker.io/library/mysql/mysql-server:8.0.27 command: ['--default-authentication-plugin=mysql_native_password', '--log_bin_trust_function_creators=1'] restart: always environment: @@ -25,7 +25,7 @@ services: - ./testdata/init/mysql:/docker-entrypoint-initdb.d mariadb: - image: mariadb:11.4 + image: docker.io/library/mariadb:11.4 command: ['--default-authentication-plugin=mysql_native_password', '--log_bin_trust_function_creators=1'] restart: always environment: @@ -38,7 +38,7 @@ services: - ./testdata/init/mysql:/docker-entrypoint-initdb.d cockroach: - image: cockroachdb/cockroach-unstable:v23.1.0-rc.2 + image: docker.io/library/cockroachdb/cockroach-unstable:v23.1.0-rc.2 environment: - COCKROACH_USER=jet - COCKROACH_PASSWORD=jet