Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
better diagnostic (JENKINS-41316)
  • Loading branch information
ndeloof committed Feb 6, 2018
1 parent f536083 commit ff01f98
Showing 1 changed file with 5 additions and 1 deletion.
Expand Up @@ -184,7 +184,11 @@ public static class Execution extends AbstractStepExecutionImpl {
container = dockerClient.run(env, step.image, step.args, ws, volumes, volumesFromContainers, envReduced, dockerClient.whoAmI(), /* expected to hang until killed */ "cat");
final List<String> ps = dockerClient.listProcess(env, container);
if (!ps.contains("cat")) {
listener.error("The container started but didn't run the expected command. Please double check your ENTRYPOINT does execute the command passed as docker run argument. See https://docs.docker.com/engine/userguide/eng-image/dockerfile_best-practices/#entrypoint for entrypoint best practices.");
listener.error(
"The container started but didn't run the expected command. " +
"Please double check your ENTRYPOINT does execute the command passed as docker run argument, " +
"as required by official docker images (see https://github.com/docker-library/official-images#consistency for entrypoint best practices).\n" +
"Alternatively you can force image entrypoint to be disabled by adding option `--entrypoint=''`.");
}

DockerFingerprints.addRunFacet(dockerClient.getContainerRecord(env, container), run);
Expand Down

0 comments on commit ff01f98

Please sign in to comment.