Skip to content

Commit

Permalink
Tag Docker images created by launch script integration tests
Browse files Browse the repository at this point in the history
  • Loading branch information
vpavic authored and wilkinsona committed Feb 24, 2016
1 parent b061aa5 commit 2641fe8
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -65,11 +65,12 @@ $ mvn -Pdocker clean verify
The first time the tests are run, Docker will create the container images that are used to
run the tests. This can take several minutes, particularly if you have a slow network
connection. Subsequent runs will be faster as the images are cached locally. You can run
`docker images` to see a list of the cached images.
`docker images` to see a list of the cached images. Images created by these tests will be
tagged with `spring-boot-it` prefix to easily distinguish them.

== Cleaning up

If you want to reclaim the disk space used by the cached images (at the expense of having
to wait for them to be downloaded and rebuilt the next time you run the tests), you can
use `docker images` to list the images and `docker rmi <image>` to delete them. See
`docker rmi --help` for further details.
use `docker images` to list the images and `docker rmi <image>` to delete them (look for
`spring-boot-it` tag). See `docker rmi --help` for further details.
Original file line number Diff line number Diff line change
Expand Up @@ -243,7 +243,8 @@ private String buildImage(DockerClient docker) {
BuildImageResultCallback resultCallback = new BuildImageResultCallback();
String dockerfile = "src/test/resources/conf/" + this.os + "/" + this.version
+ "/Dockerfile";
docker.buildImageCmd(new File(dockerfile)).exec(resultCallback);
String tag = "spring-boot-it/" + this.os.toLowerCase() + ":" + this.version;
docker.buildImageCmd(new File(dockerfile)).withTag(tag).exec(resultCallback);
String imageId = resultCallback.awaitImageId();
return imageId;
}
Expand Down

0 comments on commit 2641fe8

Please sign in to comment.