You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm considering a leap to buildah. The limitiations of Dockerfiles kinda sucks and since I'm a bash pro I see buildha will give me the flexibility lacking in Dockerfiles.
But I have been using buildx bake with buildkit and docker-containers driver in docker to build, test and push multi arch images. I really like the "target" functionality in a .hcl file. I makes it easy to make dev targets or deploy targets including multiarch targets to docker hub.
function "tag" {
params = [suffix]
result = [format("${IMAGE_NAME}%s:${TAG}", notequal("", suffix) ? "-${suffix}" : "")]
}
# groups
group "dev" {
targets = ["amd"]
}
group "default" {
targets = ["amd"]
}
group "deploy" {
targets = ["multi"]
}
group "private" {
targets = [
"amd",
"arm"
]
}
# intended for use with default local docker builder
# uses 'dev' group in docker-bake.hcl
# assume dev machine is amd64 machine
target "amd" {
context = "."
dockerfile = "Dockerfile"
args = {
LINUX_DISTRO = "${LINUX_DISTRO}"
BASE_IMAGE = "${BASE_IMAGE}"
TAG = "${TAG}"
SCRIPTS = "${BUILD_DIR}"
KEEP = "${KEEP}"
SYSADMIN_PW = "${SYSADMIN_PW}"
}
tags = tag("")
platforms = ["linux/amd64"]
}
# intended for use with default docker driver on an arm64 machine
# use with 'arm' group
target "arm" {
inherits = ["amd"]
tags = tag("arm64")
platforms = ["linux/arm64"]
}
# must use with docker-container driver for multiarch image deployment to registry
# uses 'deploy' group in docker-bake.hcl
target "multi" {
inherits = ["amd"]
tags = tag("")
platforms = ["linux/amd64", "linux/arm64"]
output = ["type=registry"]
}
Has anyone more or less developed scripts around buildah with the same functionality? If so point me to some github repos.
can buildah even build arm images on a amd machine (like moby/buildkit can inside a qemu container)?
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
I'm considering a leap to buildah. The limitiations of Dockerfiles kinda sucks and since I'm a bash pro I see buildha will give me the flexibility lacking in Dockerfiles.
But I have been using buildx bake with buildkit and docker-containers driver in docker to build, test and push multi arch images. I really like the "target" functionality in a .hcl file. I makes it easy to make dev targets or deploy targets including multiarch targets to docker hub.
Has anyone more or less developed scripts around buildah with the same functionality? If so point me to some github repos.
can buildah even build arm images on a amd machine (like moby/buildkit can inside a qemu container)?
Beta Was this translation helpful? Give feedback.
All reactions