Questions tagged [buildah]

A tool that facilitates building OCI container images.

22 questions
3
votes
1 answer

How does --hostname work with `buildah run`?

Give the example here which has an attempt at setting the hostname to foo.bar.baz for the duration of the build, #!/bin/bash ctr=$(buildah from alpine:3) buildah run --hostname 'foo.bar.baz' $ctr /bin/sh <<-'EOF' echo "/usr/bin/hostname returns…
Evan Carroll
  • 28,578
  • 45
  • 164
  • 290
3
votes
2 answers

How do you prune with buildah?

When I run buildah containers, I see this CONTAINER ID BUILDER IMAGE ID IMAGE NAME CONTAINER NAME f5a361407499 * a24bb4013296 docker.io/library/alpine:latest alpine-working-container eb03f2eb1fb6 * …
Evan Carroll
  • 28,578
  • 45
  • 164
  • 290
2
votes
0 answers

Why does buildah fail mounting overlays?

I am running buildah(quay.io/containers/buildah) in a gitlab CI/CD pipeline(kubernetes pod), but it fails building images. buildah bud . returns: mount /var/lib/containers/storage/overlay:/var/lib/containers/storage/overlay, flags: 0x1000:…
iaquobe
  • 281
  • 1
  • 4
  • 13
2
votes
1 answer

Run multiple commands inside a buildah container separated by the boolean AND (&&) operator from the command line

How can I run multiple commands inside a buildah container using bash's boolean AND && operator from the host's command line? Here's an example of my issue that starts from a debian image: $ buildah pull debian:buster && container=$(buildah from…
EarthIsHome
  • 225
  • 2
  • 8
2
votes
1 answer

What are "container-tools" and what does disabling them achieve?

The buildah docs for installation mention, sudo dnf -y module disable container-tools Interestingly, the advice for RHEL 8 BETA is to enable them sudo yum module enable -y container-tools:1.0 What does this line do? And by extension what is…
Evan Carroll
  • 28,578
  • 45
  • 164
  • 290
2
votes
1 answer

Why does `exec init` work in podman but not buildah with the same options?

How are these two commands different? Both of them launch a shell as pid 1 and make the same mounts and volumes, buildah run --tty --mount type=tmpfs,destination=/run -v /sys/fs/cgroup:/sys/fs/cgroup:ro \ $(buildah from centos:7) /bin/sh -c 'exec…
Evan Carroll
  • 28,578
  • 45
  • 164
  • 290
2
votes
2 answers

podman run with --init gives me: Error: container-init binary not found on the host: stat /usr/libexec/podman/catatonit: no such file or directory

When I run podman run --init, I get $> podman run --init -ti cp /sbin/init Error: container-init binary not found on the host: stat /usr/libexec/podman/catatonit: no such file or directory But I can easily verify that there is an init there, $>…
Evan Carroll
  • 28,578
  • 45
  • 164
  • 290
1
vote
2 answers

Can I pull an image down from a repo and save it locally as a different name?

I can pull down an image with podman pull podman pull alpine:3 This currently pulls the image down as, REPOSITORY TAG IMAGE ID CREATED SIZE docker.io/library/alpine 3 14119a10abf4 5 weeks ago …
Evan Carroll
  • 28,578
  • 45
  • 164
  • 290
1
vote
1 answer

buildah: unknown shorthand flag: 'i' in -i

If I am to launch a container with podman I can use the -ti flags to connect my terminal to the container, $ podman run -ti centos:7 /bin/sh sh-4.2# exit But the same option I build with buildah it returns $ buildah run -ti $(buildah from centos:7)…
Evan Carroll
  • 28,578
  • 45
  • 164
  • 290
1
vote
1 answer

Container runs systemd, what's the easiest way to execute a script that uses systemd?

I have a container that runs systemd, the setup instructions followed can be found at Dockerfile for systemd base image Now I have a script install.sh which I need to run in the build phase over the base image created above. The problem is that…
Evan Carroll
  • 28,578
  • 45
  • 164
  • 290
1
vote
1 answer

buildah run vs buildah unshare: what's the difference?

What is the difference between the buildah subcommand run and unshare? The documentation doesn't exactly say how buildah unshare is modifying the user namespace? And I'm confused what exaclty that means. buildah help run Runs a specified command…
Evan Carroll
  • 28,578
  • 45
  • 164
  • 290
0
votes
1 answer

Building an image with buildah I'm getting: EMFILE: too many open files

When I run buildah bud, I'm getting the following error. npm ERR! code EMFILE npm ERR! syscall open npm ERR! path /root/.npm/_cacache/index-v5/cd/a5/aca06eccd914d83e3be09412f45e00ceac1150a83df0e32d015284f4c8f6 npm ERR! errno -24 npm ERR! EMFILE: too…
Evan Carroll
  • 28,578
  • 45
  • 164
  • 290
0
votes
2 answers

How do you set --author and --message for the image using buildah?

There is both a buildah commit and a podman commit however the buildah commit doesn't support --author or --message which is provided by podman. Is there a way to get this functionality with just buildah? Or do I need to take a container online with…
Evan Carroll
  • 28,578
  • 45
  • 164
  • 290
0
votes
1 answer

When I run newapkbuild in a container I get "ERROR: : Do not run abuild as root"

I'm trying to containerize my build work flow. I do not run Alpine on the metal or in a VM but I do launch Alpine Containers. When building a new Alpine package, I'm using newapkbuild but because I'm in a container, the container thinks it's root…
Evan Carroll
  • 28,578
  • 45
  • 164
  • 290
0
votes
2 answers

What is the effect of a symlink in a buildah mount?

If I run a buildah script like this, ctr=$(buildah from alpine:3) mnt=$(buildah mount "$ctr") ln -sf "$PWD/foo" "$mnt/foo" buildah commit $ctr "myimage" Will the directory created link outside the container?
Evan Carroll
  • 28,578
  • 45
  • 164
  • 290
1
2