What happens to the Docker image after it gets released?

It is not documented what happens to Docker images after they are built and released?

  • Will they be deleted, and if so, how soon? What if some apps from the spec file could potentially reuse the images?

  • Are they actually stored on the machine running the waypoint cli, or at the waypoint server?

  • If at the waypoint server, does it mean Waypoint acts as a Docker registry in some way? Is there a way to limit the image artifacts retention policy?

In our case, one image for one of a few apps takes 700Mb, so understanding where it is stored and for how long is important.

The flow is something like this:

  1. CLI command waypoint up is issued
  2. Server receives the command and sends the build command to the Runner (which happens to be the CLI generally).
  3. When using pack, docker, and docker-pull builders, the DOCKER_HOST configured on the Runner is used to call the equivalent of docker build, which creates images there.
  4. If a registry stanza is set within build plugin a separate image location may be specified beyond the image that is built on the Runner. In the case of the docker plugin there is a variable local which defaults to false, which means by default images will be pushed to the remote registry.
  5. waypoint deploy would cause the image to be pulled to the hosts of whatever platform is being used, such as Docker, Kubernetes, etc.
  6. waypoint destroy does not appear to clean up images on the Runner currently.

Waypoint has had at least 1 bug reported and fixed related to leaving extra intermittent container images around, and there are probably other resource leaks in the early phase of the project.

My advice would be to run the equivalent of a docker system prune -a as frequently as you deem appropriate to fully clean up images that are not actively being used.

2 Likes