forked from testcontainers/testcontainers-java
-
Notifications
You must be signed in to change notification settings - Fork 2
34 lines (32 loc) · 1.13 KB
/
ci-rootless.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
name: CI-Docker-Rootless
on:
pull_request: {}
push: { branches: [ master ] }
jobs:
test:
runs-on: ubuntu-18.04
strategy:
fail-fast: false
matrix:
include:
- { XDG_RUNTIME_DIR: "" }
- { XDG_RUNTIME_DIR: "/tmp/docker-testcontainers/" }
env:
XDG_RUNTIME_DIR: ${{ matrix.XDG_RUNTIME_DIR }}
steps:
- uses: actions/checkout@v2
- name: debug
run: id -u; whoami
- name: uninstall rootful Docker
run: sudo apt-get -q -y --purge remove moby-engine moby-buildx && sudo rm -rf /var/run/docker.sock
- name: install rootless Docker
run: |
mkdir -p $XDG_RUNTIME_DIR || true
curl -fsSL https://get.docker.com/rootless | sh > init.sh
cat init.sh
source <(grep '^export' init.sh)
PATH=$HOME/bin:$PATH dockerd-rootless.sh --experimental --storage-driver vfs &
sleep 1
DOCKER_HOST=unix://$XDG_RUNTIME_DIR/docker.sock docker info || ls -la $XDG_RUNTIME_DIR
- name: Build with Gradle
run: ./gradlew --no-daemon --scan testcontainers:test --tests '*GenericContainerRuleTest'