Building your own images
Up until now, you have worked with publicly available, premade images from the Docker Hub, such as the nginx image (or the RabbitMQ and Spotify/Kafka images in Chapter 4, Asynchronous Microservice Architectures Using Message Queues). However, with Docker, it is also easy to build your own images. Generally, Docker images are built from a Dockerfile. A Dockerfile is a kind of a construction manual for new Docker images and describes how a Docker image should be built, starting from a given base image. Since it rarely makes sense to start with a completely empty filesystem (empty as in not even a shell or standard libraries), images are often built on distribution images that contain the user-space tools of popular ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access