Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Ok, I really want to use podman, but the last time I built an image and tried to run it, I ran into a brick wall.

I think I used something called buildah to package something, and it had some parameter for a name, but then trying to run it using podman, podman didn't seem to have any way to reference the container image that I THINK buildah created. I think there was also something called spokeo but I don't recall what it did, or it did not help this workflow.

The tutorials all seemed to assume pulling images from the internet.

Anyone have a good podman tutorial that really goes from install podman -> make container -> run container on a Linux box?



This works for me on Ubuntu 22.10:

  $ sudo apt install podman buildah
  $ mkdir empty && cd empty
  $ cat > Containerfile <<EOF
  FROM alpine:3.14
  RUN echo 'echo hello podman!' > /root/hello.sh
  ENTRYPOINT ["/bin/sh", "/root/hello.sh"]
  EOF
  $ buildah build -f Containerfile -t hello-podman .
  $ podman run -it --rm  localhost/hello-podman:latest
  hello podman!
edit: stryan has more minimalist instructions above.


AH, so it must be the localhost/hello-podman:latest was the axle-wrap.

I will now bitch about how everything needs to be converted to some obscure url or pseudo-url when a file path would do. This has bitten me on:

- JSP tag libraries

- XML xsd references (which back in the Spring XML namespace-go-nuts era was really annoying)

- file:///fully/qualified/path

There, I have bitched.


Were you building from a Dockerfile or Containerfile? If so, you don't need to use buildah you can just use podman build, same as you would docker. So to build an image from a Dockerfile/Containerfile in the current directory just run

podman build -t what_the_image_to_be_tagged .

Then to reference the container by name when you run it, you gotta specify that at runtime:

podman run --name foo the_image_you_just_tagged




Consider applying for YC's Winter 2026 batch! Applications are open till Nov 10

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: