No description
| .github | ||
| cmd | ||
| docker | ||
| scripts | ||
| .drone.yml | ||
| .gitignore | ||
| buildah.go | ||
| buildah_test.go | ||
| go.mod | ||
| go.sum | ||
| LICENSE | ||
| README.md | ||
| tags.go | ||
| tags_test.go | ||
drone-buildah
Drone plugin uses buildah to build and publish Docker images to a container registry. For the usage information and a listing of the available options please take a look at the docs.
Build
Build the binaries with the following commands:
export GOOS=linux
export GOARCH=amd64
export CGO_ENABLED=0
export GO111MODULE=on
go build -v -a -tags netgo -o release/linux/amd64/buildah-docker ./cmd/buildah-docker
go build -v -a -tags netgo -o release/linux/amd64/buildah-gcr ./cmd/buildah-gcr
go build -v -a -tags netgo -o release/linux/amd64/buildah-ecr ./cmd/buildah-ecr
go build -v -a -tags netgo -o release/linux/amd64/buildah-acr ./cmd/buildah-acr
go build -v -a -tags netgo -o release/linux/amd64/buildah-heroku ./cmd/buildah-heroku
Docker
Build the Docker images with the following commands:
docker build \
--label org.label-schema.build-date=$(date -u +"%Y-%m-%dT%H:%M:%SZ") \
--label org.label-schema.vcs-ref=$(git rev-parse --short HEAD) \
--file docker/docker/Dockerfile.linux.amd64 --tag ymage/buildah-docker .
docker build \
--label org.label-schema.build-date=$(date -u +"%Y-%m-%dT%H:%M:%SZ") \
--label org.label-schema.vcs-ref=$(git rev-parse --short HEAD) \
--file docker/gcr/Dockerfile.linux.amd64 --tag ymage/buildah-gcr .
docker build \
--label org.label-schema.build-date=$(date -u +"%Y-%m-%dT%H:%M:%SZ") \
--label org.label-schema.vcs-ref=$(git rev-parse --short HEAD) \
--file docker/ecr/Dockerfile.linux.amd64 --tag ymage/buildah-ecr .
docker build \
--label org.label-schema.build-date=$(date -u +"%Y-%m-%dT%H:%M:%SZ") \
--label org.label-schema.vcs-ref=$(git rev-parse --short HEAD) \
--file docker/acr/Dockerfile.linux.amd64 --tag ymage/buildah-acr .
docker build \
--label org.label-schema.build-date=$(date -u +"%Y-%m-%dT%H:%M:%SZ") \
--label org.label-schema.vcs-ref=$(git rev-parse --short HEAD) \
--file docker/heroku/Dockerfile.linux.amd64 --tag ymage/buildah-heroku .
Usage
docker run --rm \
-e PLUGIN_TAG=latest \
-e PLUGIN_REPO=octocat/hello-world \
-e DRONE_COMMIT_SHA=d8dbe4d94f15fe89232e0402c6e8a0ddf21af3ab \
--cap-add=SYS_ADMIN \
-v $(pwd):$(pwd) \
-w $(pwd) \
ymage/buildah-docker --dry-run
