How to run podman from inside a container?

后端 未结 3 870
野的像风
野的像风 2021-02-18 22:53

I want to run podman as a container to run CI/CD pipelines. However, I keep getting this error from the podman container:

         


        
3条回答
  •  庸人自扰
    2021-02-18 23:10

    Your Dockerfile should install iptables as well:

    FROM ubuntu:16.04
    
    RUN apt-get update -qq \
        && apt-get install -qq -y software-properties-common uidmap \
        && add-apt-repository -y ppa:projectatomic/ppa \
        && apt-get update -qq \
        && apt-get -qq -y install podman \
        && apt-get install -y iptables
    
    # To keep it running
    CMD tail -f /dev/null
    

    Then run the command with:

    docker run -ti --rm podman:test bash -c "podman --storage-driver=vfs info"
    

    This should give you the response you expect.

提交回复
热议问题