DevOps Articles

Curated articles, resources, tips and trends from the DevOps World.

Building Docker Images — Advanced

4 years ago medium.com
Building Docker Images — Advanced

Summary: This is a summary of an article originally published by the source. Read the full original article here →

We will take a look on how to build Docker images and take notes about building time, resulting image size and files sent to the build context. Our target is to build a Linux Docker Container with Ansible and AWS CLI installed. We have the following project file tree: We have a Dockerfile with our container specs, a .dockerignore to exclude files from build context and files to be copied into the target container.

Take note of the --no-cache to prevent caching, as we want to meassure the time it takes to build the image.

Now we have the following Dockerfile: We still use python:3.9.1-buster as base for our image to install Ansible and AWS CLI.

Made with pure grit © 2024 Jetpack Labs Inc. All rights reserved. www.jetpacklabs.com