This repository has been archived by the owner on Dec 22, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
/
doc.go
32 lines (32 loc) · 1.39 KB
/
doc.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
//Reverse docker buildx bake files into sequential docker commands
//
//docker/buildx is a plugin to the most recent docker distribution
//that allows users to define high level build information (bake files)
//and transmit that build info to the buildkit-powered docker daemon
//in a single invocation.
//
//Since this is a relatively new piece of technolgoy, many environments (including
//primarily CI and CD systems) don't yet have the most recent version of docker or
//the buildx plugin, and it introduces significant overhead to install these.
//
//unbake solves for this discrepancy by taking a bake file as an input and generating
//plain docker commands to build those targets. You'd want to run the unbake container
//in your CI against a bake file and pipe the output of it to shell to continue with a
//multi-invocation docker build process.
//
//usage
//
//Installing using the go tool
//Clone this repository and run `go install` in the module:
//git clone https://github.com/asonawalla/unbake.git
//cd unbake && go install
//
//Then invoke with a bake file and pipe the output to `sh`:
//unbake -f bake.hcl | sh
//
//Using with Docker
//Alternately, you can run unbake using the docker container uploaded to docker hub (docker is the only
//requirement, making this a promising option for CI environments):
//docker run --rm -v$(pwd):/bake asonawalla/unbake /bin/unbake -f /bake/bake.hcl | sh
//
package main