File tree Expand file tree Collapse file tree 6 files changed +9
-15
lines changed
src/test/java/de/kekru/dockerremoteapitls/test Expand file tree Collapse file tree 6 files changed +9
-15
lines changed Original file line number Diff line number Diff line change @@ -19,4 +19,4 @@ HEALTHCHECK --start-period=1s \
1919 --interval=5s \
2020 --timeout=5s \
2121 --retries=12 \
22- CMD nc -vz localhost 443 || exit 1
22+ CMD nc -vz 127.0.0.1 443 || exit 1
Original file line number Diff line number Diff line change @@ -14,11 +14,10 @@ x-sharedDeployConfig: &sharedDeployConfig
1414 cpus : ' 0.1'
1515 memory : 10M
1616
17- version : " 3.4"
18-
1917services :
2018 remote-api :
2119 << : *sharedConfig
20+ pull_policy : build
2221 build : .
2322 ports :
2423 - 8443:443
Original file line number Diff line number Diff line change 1+ FROM docker:27.3.1-cli as docker
12FROM maven:3.6.3-openjdk-8-slim
23
3- RUN curl https://download.docker.com/linux/static/stable/x86_64/docker-19.03.13.tgz | tar xvz --directory /tmp \
4- && mv -v /tmp/docker/docker /usr/local/bin/docker \
5- && chmod +x /usr/local/bin/docker \
6- && rm -rf /tmp/docker
7-
8- RUN curl -L "https://github.com/docker/compose/releases/download/1.27.4/docker-compose-$(uname -s)-$(uname -m)" -o /usr/local/bin/docker-compose \
9- && chmod +x /usr/local/bin/docker-compose
4+ COPY --from=docker --chmod=555 /usr/local/bin/docker /usr/local/bin/docker
5+ COPY --from=docker --chmod=555 /usr/local/libexec/docker/cli-plugins/ /root/.docker/cli-plugins
106
117WORKDIR /build
128COPY pom.xml .
Original file line number Diff line number Diff line change 1- version : ' 3.4'
2-
31services :
42 remote-api :
53 build : ..
@@ -12,6 +10,7 @@ services:
1210 - " /var/run/docker.sock:/var/run/docker.sock:ro"
1311
1412 test :
13+ pull_policy : build
1514 build : .
1615 volumes :
1716 - " /var/run/docker.sock:/var/run/docker.sock:ro"
Original file line number Diff line number Diff line change @@ -57,7 +57,7 @@ public void failsOnNoTls() {
5757
5858 // Then
5959 assertThat (exception )
60- .hasMessageContaining ("error during connect: Get http://abc.127.0.0.1.nip.io:30129/v1.40 /containers/json: EOF " );
60+ .hasMessageContaining ("error during connect: Get \" http://abc.127.0.0.1.nip.io:30129/v1.47 /containers/json\" " );
6161 }
6262
6363 @ Test
Original file line number Diff line number Diff line change @@ -70,7 +70,7 @@ protected static String runDockerCompose(String composeCommand) {
7070 env .put ("DOCKER_BUILDKIT" , "1" );
7171 env .put ("COMPOSE_PROJECT_NAME" , "test" );
7272 //shellExecutor.execute("docker-compose build --progress=plain remote-api", env);
73- return shellExecutor .execute ("docker- compose " + composeCommand , env );
73+ return shellExecutor .execute ("docker compose " + composeCommand , env );
7474 }
7575
7676 protected static void waitForHealthy () {
@@ -85,7 +85,7 @@ protected static void waitForHealthy() {
8585
8686 String output = runDockerCompose ("ps remote-api" );
8787
88- if (output .contains ("Up (healthy)" )) {
88+ if (output .contains ("(healthy)" )) {
8989 return ;
9090 }
9191 }
You can’t perform that action at this time.
0 commit comments