An open API service indexing awesome lists of open source software.

https://github.com/dockersamples/buildme

buildme
https://github.com/dockersamples/buildme

Last synced: about 1 year ago
JSON representation

buildme

Awesome Lists containing this project

README

          

> [!NOTE]
> This repository has been archived and is no longer maintained.
> For more information on how to build with Docker,
> see the [Building images](https://docs.docker.com/get-started/docker-concepts/building-images/) guide.

# Build with Docker

This repository contains an example Go application, used in the
Build with Docker guide.

This goal of this guide is to illustrate Docker Build features and best
practices.

## In this repository

You'll find the Go source code for the application in the `cmd` directory. For
the purpose of the Build guide, there's no need to understand or interact with
the source code in any way. The guide only refers to Dockerfile changes.

The `Dockerfile` in the root directory of this project is the starting point for
this guide. It contains the unmodified version.

The `chapters` directory contains the finished Dockerfile examples for each
section of the guide. The sections are enumerated 1-8, and the Dockerfiles in
this directory are named after the section that they correspond to.

## Tasks

This repository implements [Task](https://taskfile.dev/) to make it easier to
switch between stages, or reset Dockerfile.

To reset your Dockerfile to a specific stage, install Task and run
`task goto:`. This overwrites the contents of the Dockerfile to the
**finished version** of the selected stage.

For example, running `task goto:1` resets the Dockerfile the starting point of
the guide. Running `task goto:4` resets the Dockerfile to reflect the **finished
version** of the 4th section of the guide.