Skip to main content

Prepare the Toolbox Docker-Image

DevOps is a powerful Linux toolbox container designed to optimize DevOps workflows by providing essential dependencies for a DevOps toolchain, ensuring consistency and efficiency across development environments without additional software installation on your workstation. It can be extended and customized to fit specific needs by creating your own Dockerfile based on DevOps, allowing you to add your favorite tools and share the container with your team for a unified working environment.

NOTE:

DevOps is similar in principle to devcontainers. However, being a container itself, DevOps can run anywhere containers are supported—whether on your local workstation, remotely inside clusters, or on bastion hosts. Additionally, you can use DevOps as the base image for a devcontainer.

Building the Toolbox Image

Build a DevOps infrastructure container. This container that has all the tools like terraform and task for building infrastructure. It's built from the Dockerfile and there are some predefined targets defined in the Makefile to make this easy. Customize these for your organization. Here are examples of both for reference.

--CollapsibleText type="medium"> --CodeBlock title="Dockerfile" -- PartialDockerfile -- --CollapsibleText>

--CollapsibleText type="medium"> --CodeBlock title="Makefile" -- PartialMakefile -- --CollapsibleText>

The standard Makefile includes a number of commands. In order to build the initial, complete DevOps image, run the following:

make all

On future builds, use make run to use the cached image.

Alias

We install a wrapper script with make all to your chosen namespace. For example, simply enter for given namespace to start your DevOps container once built:

acme

See the install step of the Makefile for more details.

Build the toolbox image locally before continuing.

Follow the toolbox image setup steps in the How-to Get Started guide. In short, run make all.

The container will have the given local home mapped, so you should be able to use aws normally inside it once you set a profile that has valid credentials. For instance, if I log in to the profile acme with leapp, I can run aws --profile acme sts get-caller-identity and get a response.

Once you've verified that the infra container has access to aws resources, we can move on to the next step.

What comes next?

With your repository set up, workstation configured and toolbox in hand, you're ready to get to work provisioning your infrastructure with Semaphore and Terraform. The next step is to learn how to provision AWS accounts.

Next Step