test: container options with -v binds
CI Test / test (push) Failing after 1s

This commit is contained in:
dev
2026-08-31 11:32:49 +08:00
parent 971047237e
commit 3a8b80414c
+14 -5
View File
@@ -5,9 +5,18 @@ jobs:
runs-on: ubuntu-latest
container:
image: docker:24.0-cli
volumes:
- /var/run/docker.sock:/var/run/docker.sock
- /opt/freedom:/opt/freedom
options: >-
-v /var/run/docker.sock:/var/run/docker.sock
-v /opt/freedom:/opt/freedom
--add-host host.docker.internal:host-gateway
steps:
- name: Hello
run: echo hello-with-volumes
- name: Verify mounts
run: |
echo "=== /opt/freedom ==="
ls /opt/freedom | head -5
echo "=== docker.sock ==="
test -S /var/run/docker.sock && echo SOCK_OK || echo SOCK_NO
echo "=== host resolution ==="
getent hosts host.docker.internal || echo NOT_RESOLVED
echo "=== docker version ==="
docker version --format '{{.Server.Version}}'