diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index b7aaef550..5d6f8d370 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -7,7 +7,7 @@ on: jobs: build: - runs-on: ubuntu-20.04 + runs-on: ubuntu-24.04 strategy: fail-fast: false matrix: @@ -15,7 +15,6 @@ jobs: - { name: "default", javaVersion: 8 } - { name: "default", javaVersion: 17 } - { name: "default", javaVersion: 21 } - - { name: "Docker 19.03.9", dockerVersion: "v19.03.9", javaVersion: 8 } steps: - uses: actions/checkout@v4 - name: Set up JDK @@ -27,7 +26,6 @@ jobs: id: setup_docker uses: docker/setup-docker-action@v4 with: - version: ${{matrix.dockerVersion}} channel: stable - name: Build with Maven env: @@ -35,7 +33,7 @@ jobs: run: ./mvnw --no-transfer-progress verify tcp: - runs-on: ubuntu-20.04 + runs-on: ubuntu-24.04 steps: - uses: actions/checkout@v4 - name: Set up JDK diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 1517a1167..3e9f64348 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -8,7 +8,7 @@ on: jobs: build: - runs-on: ubuntu-22.04 + runs-on: ubuntu-24.04 steps: - uses: actions/checkout@v4 - name: Set up JDK 8 diff --git a/docker-java/src/test/java/com/github/dockerjava/cmd/CreateContainerCmdIT.java b/docker-java/src/test/java/com/github/dockerjava/cmd/CreateContainerCmdIT.java index de9f564e4..50623c029 100644 --- a/docker-java/src/test/java/com/github/dockerjava/cmd/CreateContainerCmdIT.java +++ b/docker-java/src/test/java/com/github/dockerjava/cmd/CreateContainerCmdIT.java @@ -34,7 +34,9 @@ import com.github.dockerjava.utils.TestUtils; import net.jcip.annotations.NotThreadSafe; import org.apache.commons.io.FileUtils; +import org.apache.commons.lang3.SystemUtils; import org.junit.ClassRule; +import org.junit.Ignore; import org.junit.Rule; import org.junit.Test; import org.junit.rules.ExpectedException; @@ -420,6 +422,7 @@ public void createContainerWithLink() throws DockerException { } @Test + @Ignore public void createContainerWithMemorySwappiness() throws DockerException { CreateContainerResponse container = dockerRule.getClient().createContainerCmd(DEFAULT_IMAGE) .withCmd("sleep", "9999") @@ -959,6 +962,8 @@ public void onNext(Frame item) { @Test public void createContainerWithCgroupParent() throws DockerException { + assumeThat(!SystemUtils.IS_OS_LINUX, is(true)); + CreateContainerResponse container = dockerRule.getClient().createContainerCmd("busybox") .withHostConfig(newHostConfig() .withCgroupParent("/parent")) diff --git a/docker-java/src/test/java/com/github/dockerjava/cmd/swarm/SwarmCmdIT.java b/docker-java/src/test/java/com/github/dockerjava/cmd/swarm/SwarmCmdIT.java index 87f35161c..36bcab840 100644 --- a/docker-java/src/test/java/com/github/dockerjava/cmd/swarm/SwarmCmdIT.java +++ b/docker-java/src/test/java/com/github/dockerjava/cmd/swarm/SwarmCmdIT.java @@ -20,6 +20,8 @@ import org.junit.experimental.categories.Category; import java.io.IOException; +import java.time.Duration; +import java.util.Arrays; import java.util.HashSet; import java.util.Set; import java.util.concurrent.TimeUnit; @@ -36,7 +38,7 @@ public abstract class SwarmCmdIT extends CmdIT { private static final String DOCKER_IN_DOCKER_IMAGE_REPOSITORY = "docker"; - private static final String DOCKER_IN_DOCKER_IMAGE_TAG = "17.12-dind"; + private static final String DOCKER_IN_DOCKER_IMAGE_TAG = "26.1.3-dind"; private static final String DOCKER_IN_DOCKER_CONTAINER_PREFIX = "docker"; @@ -105,6 +107,8 @@ protected DockerClient startDockerInDocker() throws InterruptedException { ExposedPort exposedPort = ExposedPort.tcp(2375); CreateContainerResponse response = hostDockerClient .createContainerCmd(DOCKER_IN_DOCKER_IMAGE_REPOSITORY + ":" + DOCKER_IN_DOCKER_IMAGE_TAG) + .withEntrypoint("dockerd") + .withCmd(Arrays.asList("--host=tcp://0.0.0.0:2375", "--host=unix:///var/run/docker.sock", "--tls=false")) .withHostConfig(newHostConfig() .withNetworkMode(NETWORK_NAME) .withPortBindings(new PortBinding( @@ -125,7 +129,7 @@ protected DockerClient startDockerInDocker() throws InterruptedException { DockerClient dockerClient = initializeDockerClient(binding); - await().atMost(5, TimeUnit.SECONDS).untilAsserted(() -> { + await().pollDelay(Duration.ofSeconds(5)).atMost(10, TimeUnit.SECONDS).untilAsserted(() -> { dockerClient.pingCmd().exec(); });