Docker image is too large

Description:

You've just joined a team preparing a new Go service for production. A concern has come up during a pre-release review: the current Docker image, tagged myapp:1.0, has a DISK USAGE over 1 GB. This is above the acceptable threshold for an image used in production. As part of the optimization effort, you've been tasked with reducing the size of the Docker image. The source code of the service can be found in the directory /home/lab/myapp . Base images pre-approved for production are already present in the environment.

Tasks:

  • Build an optimized image tagged as myapp:2.0 with a DISK USAGE under 20 MB.

Level: Intermediate

Estimated duration: 30min

Access: Signup required

Tags: Docker

Scenarios