$ cat Dockerfile FROM fedora RUN yum update -y && yum install -y openssh-server openssh-clients jq origin-clients && yum clean all COPY launch.sh /bin/ RUN chmod +x /bin/launch.sh CMD /bin/launch.sh $ docker build --no-cache . -t quay.io/eparis/ssh Sending build context to Docker daemon 4.608 kB Step 1/5 : FROM fedora ---> d09302f77cfc Step 2/5 : RUN yum update -y && yum install -y openssh-server openssh-clients jq origin-clients && yum clean all ---> Running in 789076fda42f Fedora Modular 29 - x86_64 222 kB/s | 1.5 MB 00:06 Fedora Modular 29 - x86_64 - Updates 414 kB/s | 2.1 MB 00:05 Fedora 29 - x86_64 - Updates 1.2 MB/s | 24 MB 00:20 Fedora 29 - x86_64 4.5 MB/s | 62 MB 00:13 Last metadata expiration check: 0:00:01 ago on Tue Mar 19 02:05:18 2019. Dependencies resolved. ================================================================================ Package Arch Version Repository Size ================================================================================ Upgrading: libcap-ng x86_64 0.7.9-5.fc29 updates 26 k libxcrypt x86_64 4.4.4-1.fc29 updates 119 k [snip lots of success] Complete! 33 files removed ---> 688395a2f3d0 Removing intermediate container 789076fda42f Step 3/5 : COPY launch.sh /bin/ ---> d7a8e885f634 Removing intermediate container ff222778884c Step 4/5 : RUN chmod +x /bin/launch.sh ---> Running in fbb04c02c0b3 ---> fa8dd50b9d5e Removing intermediate container fbb04c02c0b3 Step 5/5 : CMD /bin/launch.sh ---> Running in 8d5d68e10301 ---> 6e453814bbfe Removing intermediate container 8d5d68e10301 Successfully built 6e453814bbfe $ podman build --no-cache . -t quay.io/eparis/ssh STEP 1: FROM fedora STEP 2: RUN yum update -y && yum install -y openssh-server openssh-clients jq origin-clients && yum clean all Fedora Modular 29 - x86_64 0.0 B/s | 0 B 00:00 Failed to synchronize cache for repo 'fedora-modular' Error: Failed to synchronize cache for repo 'fedora-modular' Error: error building at step {Env:[PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin DISTTAG=fcontainer FGC=f FBR=f] Command:run Args:[yum update -y && yum install -y openssh-server openssh-clients jq origin-clients && yum clean all] Flags:[] Attrs:map[] Message:RUN yum update -y && yum install -y openssh-server openssh-clients jq origin-clients && yum clean all Original:RUN yum update -y && yum install -y openssh-server openssh-clients jq origin-clients && yum clean all}: error while running runtime: exit status 1 $ docker version Client: Version: 1.13.1 API version: 1.26 Package version: docker-1.13.1-65.git1185cfd.fc30.x86_64 Go version: go1.12beta2 Git commit: 1185cfd/1.13.1 Built: Tue Feb 12 16:56:28 2019 OS/Arch: linux/amd64 Server: Version: 1.13.1 API version: 1.26 (minimum version 1.12) Package version: docker-1.13.1-65.git1185cfd.fc30.x86_64 Go version: go1.12beta2 Git commit: 1185cfd/1.13.1 Built: Tue Feb 12 16:56:28 2019 OS/Arch: linux/amd64 Experimental: false $ podman version Version: 1.1.2 RemoteAPI Version: 1 Go Version: go1.12 OS/Arch: linux/amd64
This worked fine for me. I think you had a hiccup in the network that caused yum inside of the container to fail. Could you try the podman command again.
$ podman build --no-cache -t quay.io/eparis/ssh . STEP 1: FROM fedora STEP 2: RUN yum update -y && yum install -y openssh-server openssh-clients jq origin-clients && yum clean all Fedora Modular 29 - x86_64 0.0 B/s | 0 B 00:01 Failed to synchronize cache for repo 'fedora-modular' Error: Failed to synchronize cache for repo 'fedora-modular' Error: error building at step {Env:[PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin DISTTAG=fcontainer FGC=f FBR=f] Command:run Args:[yum update -y && yum install -y openssh-server openssh-clients jq origin-clients && yum clean all] Flags:[] Attrs:map[] Message:RUN yum update -y && yum install -y openssh-server openssh-clients jq origin-clients && yum clean all Original:RUN yum update -y && yum install -y openssh-server openssh-clients jq origin-clients && yum clean all}: error while running runtime: exit status 1 $ rpm -q podman podman-1.1.2-2.dev.git0ad9b6b.fc30.x86_64
Weird. Do regular containers work for you?
Giuseppe any idea?
$ podman run --rm -ti docker.io/library/fedora /bin/bash [root@490d2bd80a16 /]# cat /etc/os-release NAME=Fedora VERSION="29 (Container Image)" ID=fedora VERSION_ID=29 VERSION_CODENAME="" PLATFORM_ID="platform:f29" PRETTY_NAME="Fedora 29 (Container Image)" ANSI_COLOR="0;34" LOGO=fedora-logo-icon CPE_NAME="cpe:/o:fedoraproject:fedora:29" HOME_URL="https://fedoraproject.org/" DOCUMENTATION_URL="https://docs.fedoraproject.org/en-US/fedora/f29/system-administrators-guide/" SUPPORT_URL="https://fedoraproject.org/wiki/Communicating_and_getting_help" BUG_REPORT_URL="https://bugzilla.redhat.com/" REDHAT_BUGZILLA_PRODUCT="Fedora" REDHAT_BUGZILLA_PRODUCT_VERSION=29 REDHAT_SUPPORT_PRODUCT="Fedora" REDHAT_SUPPORT_PRODUCT_VERSION=29 PRIVACY_POLICY_URL="https://fedoraproject.org/wiki/Legal:PrivacyPolicy" VARIANT="Container Image" VARIANT_ID=container
running yum in a fedora container seems to work... $ podman run --rm -ti docker.io/library/fedora /bin/bash [root@2070d206c7f5 /]# yum update -y && yum install -y openssh-server openssh-clients jq origin-clients && yum clean all Fedora Modular 29 - x86_64 291 kB/s | 1.5 MB 00:05 Fedora Modular 29 - x86_64 - Updates 455 kB/s | 2.1 MB 00:04 Fedora 29 - x86_64 - Updates 869 kB/s | 24 MB 00:28 Fedora 29 - x86_64 2% [==- ] 1.0 MB/s | 1.8 MB 01:00 ETA
how does your /etc/resolv.conf look like on the host? I think it is the issue with rootless Buildah where we bind mount /etc/resolv.conf and we cannot reach 127.0.0.1 on the host, we have a workaround for using --net host, that got merged few days ago: https://github.com/containers/libpod/pull/2585 https://github.com/containers/buildah/pull/1395
$ cat /etc/resolv.conf # Generated by NetworkManager search redhat.com nameserver 127.0.0.1
that confirms the issue: when we bind mount /etc/resolv.conf in the container we are not able to reach 127.0.0.1 from the container
Dan, Buildah uses by default --net host when running as root user. Should we do the same for rootless or expect an explicit --net host? The difference with podman is that we don't have the pkg/resolvconf logic for cleaning up the resolv.conf file
Yes buildah as root should run the same as non-root.
opened a pr here: https://github.com/containers/buildah/pull/1421
podman-1.2.0-2.git3bd528e.fc29 has been submitted as an update to Fedora 29. https://bodhi.fedoraproject.org/updates/FEDORA-2019-8875ae3cff
podman-1.2.0-2.git3bd528e.fc30 has been submitted as an update to Fedora 30. https://bodhi.fedoraproject.org/updates/FEDORA-2019-dede809f2a
podman-1.2.0-2.git3bd528e.fc29 has been pushed to the Fedora 29 testing repository. If problems still persist, please make note of it in this bug report. See https://fedoraproject.org/wiki/QA:Updates_Testing for instructions on how to install test updates. You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2019-8875ae3cff
podman-1.2.0-2.git3bd528e.fc30 has been pushed to the Fedora 30 testing repository. If problems still persist, please make note of it in this bug report. See https://fedoraproject.org/wiki/QA:Updates_Testing for instructions on how to install test updates. You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2019-dede809f2a
podman-1.2.0-2.git3bd528e.fc30 has been pushed to the Fedora 30 stable repository. If problems still persist, please make note of it in this bug report.
podman-1.2.0-2.git3bd528e.fc29 has been pushed to the Fedora 29 stable repository. If problems still persist, please make note of it in this bug report.