Buildah installed in a Fedora Image for building AMD and ARM images during CI builds
1.2K
Requires Docker or Kubernetes in privledged mode
This images is used as a build kit for multi-architecture CI images with GitLab CI on Kubernetes. The image itself is build for AMD64 and ARM64 processors so that either system can be used to build Docker images for both platforms.
The container sets the STORAGE_DRIVER to vfs and the BUILDAH_FORMAT to docker for the buildah system. Due to gitlab requirements it uses iptables instead of nftables.
To run this container with kubectl for debug purposes use the command:
kubectl run -i --privileged --rm --tty buildah-$$ --image=docker.io/jjschwarz/buildah --restart=Never -- sh
To quickly test out a build you can use the commands
cat > package.json << EOF
{
"name": "node-web-app",
"version": "1.0.0",
"description": "Node.js on Docker",
"author": "Jason Schwarz <[email protected]>",
"main": "server.js",
"license": "UNLICENSED",
"scripts": {
"start": "node server.js"
},
"repository": {
"type": "git",
"url": "https://gitlab.priv.lothlorien.net/jason/node-web-app.git"
},
"dependencies": {
"express": "^4.17.1"
}
}
EOF
cat > Dockerfile << EOF
FROM docker.io/node:24
WORKDIR /usr/app
COPY package.json .
RUN npm install
EOF
buildah bud --platform linux/amd64 -t localhost/test .
Content type
Image
Digest
sha256:51cb7105c…
Size
635.1 MB
Last updated
5 months ago
docker pull jjschwarz/buildah