Sign inSign up

cenk1cenk2/pipe-docker

By cenk1cenk2

Updated 4 months ago

Builds and publishes a Docker image with given conditions.

Image
0

10K+

cenk1cenk2/pipe-docker repository overview

pipe-docker

Builds and publishes Docker images from CI/CD.

pipe-docker [GLOBAL FLAGS] [COMMAND] [FLAGS]

Global Flags

CLI

Flag / EnvironmentDescriptionTypeRequiredDefault
$LOG_LEVELDefine the log level for the application.string
enum("panic", "fatal", "warn", "info", "debug", "trace")
falseinfo
$ENV_FILEEnvironment files to inject.string[]false[]

Commands

pipe-docker login

Login to the given Docker registries.

Flags

Docker

Flag / EnvironmentDescriptionTypeRequiredDefault
$DOCKER_BUILDKIT
$DOCKER_USE_BUILDKIT
Use Docker BuildKit for building images.boolfalsetrue
$DOCKER_USE_BUILDXUse Docker BuildX builder for multi-platform builds.boolfalsefalse
$DOCKER_BUILDX_INSTANCEDocker BuildX instance to be started or to use.stringfalseCI

Docker Registry

Flag / EnvironmentDescriptionTypeRequiredDefault
$DOCKER_REGISTRYDocker registry url to login to.stringfalse
$DOCKER_REGISTRY_USERNAMEDocker registry username for the given registry.stringfalse
$DOCKER_REGISTRY_PASSWORDDocker registry password for the given registry.stringfalse
pipe-docker build

Build Docker images.

Flags

Docker

Flag / EnvironmentDescriptionTypeRequiredDefault
$DOCKER_BUILDKIT
$DOCKER_USE_BUILDKIT
Use Docker BuildKit for building images.boolfalsetrue
$DOCKER_USE_BUILDXUse Docker BuildX builder for multi-platform builds.boolfalsefalse
$DOCKER_BUILDX_INSTANCEDocker BuildX instance to be started or to use.stringfalseCI
$DOCKER_BUILDX_PLATFORMSPlatform arguments for Docker BuildX.stringfalselinux/amd64

Docker Image

Flag / EnvironmentDescriptionTypeRequiredDefault
$DOCKER_IMAGE_NAMEImage name for the will be built Docker image.stringtrue
$DOCKER_IMAGE_TAGSImage tag for the will be built Docker image.string[]true[]
$DOCKERFILE_CONTEXTDockerfile context argument for build operation.stringfalse.
$DOCKERFILE_NAMEDockerfile path for the build operationstringfalseDockerfile
$DOCKER_IMAGE_TAGS_AS_LATESTRegex pattern to tag the image as latest.
Use either "heads/" for narrowing the search to branches or "tags/" for narrowing the search to tags.
string
json(RegExp[])
false[ "^tags/v?\d+.\d+.\d+$" ]
$DOCKER_IMAGE_SANITIZE_TAGSSanitizes the given regex pattern out of tag name.
Template is interpolated with the given matches in the regular expression.
string
json([]struct { match: RegExp, template: Template[string](RegExpMatch) })
false[
{ "match": "([^/])/(.)", "template": "{{ index $ 1
$DOCKER_IMAGE_TAGS_TEMPLATEModifies every tag that matches a certain condition.
Template is interpolated with the given matches in the regular expression.
string
json([]struct { match: RegExp, template: Template[string](RegExpMatch) })
false[]
$DOCKER_IMAGE_INSPECTInspect after pushing the image.boolfalsetrue
$DOCKER_IMAGE_BUILD_ARGSPass in extra build arguments for image.
You can use it as a template with environment variables as the context.
string[]
format(map[string]Template[string]())
false[]
$DOCKER_IMAGE_PULLPull before building the image.boolfalsetrue
$DOCKER_MANIFEST_OUTPUT_FILEWrite all the images that are published in to a file for later use.string
format(Template[string]([]string))
false.published-docker-images_{{ $

Docker Manifest

Flag / EnvironmentDescriptionTypeRequiredDefault
$DOCKER_MANIFEST_TARGETTarget image names for patching the manifest.string
format(Template[string]([]string))
false

Docker Registry

Flag / EnvironmentDescriptionTypeRequiredDefault
$DOCKER_REGISTRYDocker registry url to login to.stringfalse
$DOCKER_REGISTRY_USERNAMEDocker registry username for the given registry.stringfalse
$DOCKER_REGISTRY_PASSWORDDocker registry password for the given registry.stringfalse

GIT

Flag / EnvironmentDescriptionTypeRequiredDefault
$CI_COMMIT_REF_NAME
$BITBUCKET_BRANCH
Source control branch.stringfalse
$CI_COMMIT_TAG
$BITBUCKET_TAG
Source control tag.stringfalse

Tags File

Flag / EnvironmentDescriptionTypeRequiredDefault
$TAGS_FILERead tags from a file.stringfalse
$TAGS_FILE_STRICTFail on missing tags file.boolfalsefalse
pipe-docker manifest

Update manifests of the Docker images.

Flags

Docker

Flag / EnvironmentDescriptionTypeRequiredDefault
$DOCKER_BUILDKIT
$DOCKER_USE_BUILDKIT
Use Docker BuildKit for building images.boolfalsetrue
$DOCKER_USE_BUILDXUse Docker BuildX builder for multi-platform builds.boolfalsefalse
$DOCKER_BUILDX_INSTANCEDocker BuildX instance to be started or to use.stringfalseCI

Docker Manifest

Flag / EnvironmentDescriptionTypeRequiredDefault
$DOCKER_MANIFEST_FILESRead published tags from a file.string[]
format(glob)
false[**/.published-docker-images*]
$DOCKER_MANIFEST_TARGETTarget image names for patching the manifest.string
format(Template[string]())
false
$DOCKER_MANIFEST_IMAGESImage names for patching the manifest with the given target.string[]false[]
$DOCKER_MANIFEST_MATRIXMatrix of all the images that should be manifested.string
json([]struct { target: string, images: []string })
false

Docker Registry

Flag / EnvironmentDescriptionTypeRequiredDefault
$DOCKER_REGISTRYDocker registry url to login to.stringfalse
$DOCKER_REGISTRY_USERNAMEDocker registry username for the given registry.stringfalse
$DOCKER_REGISTRY_PASSWORDDocker registry password for the given registry.stringfalse

Tag summary

Content type

Image

Digest

sha256:b9687f28a

Size

164 MB

Last updated

4 months ago

docker pull cenk1cenk2/pipe-docker