Need help in creating a rootless container in podman
Trying to create a rootless container on Redhat . i am facing some problems. Can anybody help ?I am following below link https://medium.com/devops-dudes/how-to-setup-root-less-podman-containers-efd... I can create a container from root user on redhat but when trying from normal user getting below error Error: Error initializing source docker://registry.access.redhat.com/ubi8/ubi:latest: error getting username and password: error reading JSON file "/home/$USER/.docker/config.json": open /home/$USER/.docker/config.json: permission denied
You haven't provided any details as to the version of Red Hat or the error message. However you are following a howto for Arch linux with a huge amount of added complexity. Please ditch the howto! The installation instructions for most distros (dnf/yum install...) are right here: https://podman.io/getting-started/installation Once installed, you should be able to (as user not root): podmand build -t myimage Dockerfile podman run -it --name myimage bash On Sun, 25 Apr 2021 at 07:11, <supravapanda@gmail.com> wrote:
Trying to create a rootless container on Redhat . i am facing some problems. Can anybody help ?I am following below link
https://medium.com/devops-dudes/how-to-setup-root-less-podman-containers-efd...
I can create a container from root user on redhat but when trying from normal user getting below error
Error: Error initializing source docker:// registry.access.redhat.com/ubi8/ubi:latest: error getting username and password: error reading JSON file "/home/$USER/.docker/config.json": open /home/$USER/.docker/config.json: permission denied _______________________________________________ Podman mailing list -- podman@lists.podman.io To unsubscribe send an email to podman-leave@lists.podman.io
-- Boyd Kelly <bkelly@coastsystems.net> www: http://www.coastsystems.net Tel: +1 604 837-0765
I had installed container-tools. When i tried again this ,i get below error atlvrmsbmld02:/home/orequest[ 51 ] --> sudo yum module enable -y container-tools:1.0 Updating Subscription Management repositories. Red Hat Enterprise Linux 8 for x86_64 - Supplementary (RPMs) 33 kB/s | 2.1 kB 00:00 Red Hat Enterprise Linux 8 for x86_64 - AppStream (RPMs) 36 kB/s | 2.8 kB 00:00 AMD CUSTOM RHEL8 33 kB/s | 2.1 kB 00:00 Red Hat Enterprise Linux 8 for x86_64 - BaseOS (RPMs) 36 kB/s | 2.4 kB 00:00 Red Hat Satellite Tools 6.6 for RHEL 8 x86_64 (RPMs) 30 kB/s | 2.1 kB 00:00 Dependencies resolved. The operation would result in switching of module 'container-tools' stream 'rhel8' to stream '1.0' Error: It is not possible to switch enabled streams of a module. My OS output ===== atlvrmsbmld02:/home/orequest[ 52 ] --> cat /etc/os-release NAME="Red Hat Enterprise Linux" VERSION="8.3 (Ootpa)" ID="rhel" ID_LIKE="fedora" VERSION_ID="8.3" PLATFORM_ID="platform:el8" PRETTY_NAME="Red Hat Enterprise Linux 8.3 (Ootpa)" ANSI_COLOR="0;31" CPE_NAME="cpe:/o:redhat:enterprise_linux:8.3:GA" HOME_URL="https://www.redhat.com/" BUG_REPORT_URL="https://bugzilla.redhat.com/" REDHAT_BUGZILLA_PRODUCT="Red Hat Enterprise Linux 8" REDHAT_BUGZILLA_PRODUCT_VERSION=8.3 REDHAT_SUPPORT_PRODUCT="Red Hat Enterprise Linux" REDHAT_SUPPORT_PRODUCT_VERSION="8.3"
Please remove we that very old stream: yum module remove container-tools:1.0 And, install the latest version: yum module install container-tools:rhel8 The 1.0 stream was released in RHEL 8.0 when rootless wasn't fully supported yet. If you'd like to see all of the Application Streams available, along the specific versions of podman/build ah/slopes provided, run the following command: yum module list | grep container-tools Finally, check out th official docs here; https://access.redhat.com/documentation/en-us/red_hat_enterprise_linux/8/htm... And, specific docs for rootless: https://access.redhat.com/documentation/en-us/red_hat_enterprise_linux/8/htm... Best Regards Scott M On Sun, Apr 25, 2021, 8:09 AM <supravapanda@gmail.com> wrote:
I had installed container-tools. When i tried again this ,i get below error
atlvrmsbmld02:/home/orequest[ 51 ] --> sudo yum module enable -y container-tools:1.0 Updating Subscription Management repositories. Red Hat Enterprise Linux 8 for x86_64 - Supplementary (RPMs) 33 kB/s | 2.1 kB 00:00 Red Hat Enterprise Linux 8 for x86_64 - AppStream (RPMs) 36 kB/s | 2.8 kB 00:00 AMD CUSTOM RHEL8 33 kB/s | 2.1 kB 00:00 Red Hat Enterprise Linux 8 for x86_64 - BaseOS (RPMs) 36 kB/s | 2.4 kB 00:00 Red Hat Satellite Tools 6.6 for RHEL 8 x86_64 (RPMs) 30 kB/s | 2.1 kB 00:00 Dependencies resolved. The operation would result in switching of module 'container-tools' stream 'rhel8' to stream '1.0' Error: It is not possible to switch enabled streams of a module.
My OS output ===== atlvrmsbmld02:/home/orequest[ 52 ] --> cat /etc/os-release NAME="Red Hat Enterprise Linux" VERSION="8.3 (Ootpa)" ID="rhel" ID_LIKE="fedora" VERSION_ID="8.3" PLATFORM_ID="platform:el8" PRETTY_NAME="Red Hat Enterprise Linux 8.3 (Ootpa)" ANSI_COLOR="0;31" CPE_NAME="cpe:/o:redhat:enterprise_linux:8.3:GA" HOME_URL="https://www.redhat.com/" BUG_REPORT_URL="https://bugzilla.redhat.com/"
REDHAT_BUGZILLA_PRODUCT="Red Hat Enterprise Linux 8" REDHAT_BUGZILLA_PRODUCT_VERSION=8.3 REDHAT_SUPPORT_PRODUCT="Red Hat Enterprise Linux" REDHAT_SUPPORT_PRODUCT_VERSION="8.3" _______________________________________________ Podman mailing list -- podman@lists.podman.io To unsubscribe send an email to podman-leave@lists.podman.io
I have tried all options.when run podman pull command as a normal user i get below error.but as sudo it works fine. Can i know what need to done to run the command as a non root user.. atlvrmsbmld02:/home/orequest[ 53 ] --> podman pull registry.access.redhat.com/ubi8/ubi Trying to pull registry.access.redhat.com/ubi8/ubi:latest... Getting image source signatures Copying blob 4b21dcdd136d done Copying blob 55eda7743468 done Copying config 613e5da7a9 done Writing manifest to image destination Storing signatures Error processing tar file(exit status 1): Error setting up pivot dir: mkdir /home/orequest/.local/share/containers/storage/overlay/476579af086aee78cb12d88b08fd6b61a80a3f055cae293ec2d15a37dbe7b3f9/diff/.pivot_root471672024: permission denied Error: Error committing the finished image: error adding layer with blob "sha256:4b21dcdd136d133a4df0840e656af2f488c226dd384a98b89ced79064a4081b4": Error processing tar file(exit status 1): Error setting up pivot dir: mkdir /home/orequest/.local/share/containers/storage/overlay/476579af086aee78cb12d88b08fd6b61a80a3f055cae293ec2d15a37dbe7b3f9/diff/.pivot_root471672024: permission denied
On 2021-04-25 13:17 -0000, supravapanda@gmail.com wrote:
I have tried all options.when run podman pull command as a normal user i get below error.but as sudo it works fine. Can i know what need to done to run the command as a non root user..
atlvrmsbmld02:/home/orequest[ 53 ] --> podman pull registry.access.redhat.com/ubi8/ubi Trying to pull registry.access.redhat.com/ubi8/ubi:latest... Getting image source signatures Copying blob 4b21dcdd136d done Copying blob 55eda7743468 done Copying config 613e5da7a9 done Writing manifest to image destination Storing signatures Error processing tar file(exit status 1): Error setting up pivot dir: mkdir /home/orequest/.local/share/containers/storage/overlay/476579af086aee78cb12d88b08fd6b61a80a3f055cae293ec2d15a37dbe7b3f9/diff/.pivot_root471672024: permission denied Error: Error committing the finished image: error adding layer with blob "sha256:4b21dcdd136d133a4df0840e656af2f488c226dd384a98b89ced79064a4081b4": Error processing tar file(exit status 1): Error setting up pivot dir: mkdir /home/orequest/.local/share/containers/storage/overlay/476579af086aee78cb12d88b08fd6b61a80a3f055cae293ec2d15a37dbe7b3f9/diff/.pivot_root471672024: permission denied _______________________________________________ Podman mailing list -- podman@lists.podman.io To unsubscribe send an email to podman-leave@lists.podman.io
Maybe, is your SELinux context OK? $ id # ensure you are you :) $ getenforce $ restorecon -vR /home/orequest/.local/ Also if you do not have anything important there, you can delete the dir in case it was accidentally created before with some wrong permissions: $ rm -rf /home/orequest/.local/share/containers/ # danger! this # deletes that directory Just guessing. Regards, Jan -- Jan Hutar Performance Engineering jhutar@redhat.com Red Hat, Inc.
On 4/25/21 09:17, supravapanda@gmail.com wrote:
I have tried all options.when run podman pull command as a normal user i get below error.but as sudo it works fine. Can i know what need to done to run the command as a non root user..
atlvrmsbmld02:/home/orequest[ 53 ] --> podman pull registry.access.redhat.com/ubi8/ubi Trying to pull registry.access.redhat.com/ubi8/ubi:latest... Getting image source signatures Copying blob 4b21dcdd136d done Copying blob 55eda7743468 done Copying config 613e5da7a9 done Writing manifest to image destination Storing signatures Error processing tar file(exit status 1): Error setting up pivot dir: mkdir /home/orequest/.local/share/containers/storage/overlay/476579af086aee78cb12d88b08fd6b61a80a3f055cae293ec2d15a37dbe7b3f9/diff/.pivot_root471672024: permission denied Error: Error committing the finished image: error adding layer with blob "sha256:4b21dcdd136d133a4df0840e656af2f488c226dd384a98b89ced79064a4081b4": Error processing tar file(exit status 1): Error setting up pivot dir: mkdir /home/orequest/.local/share/containers/storage/overlay/476579af086aee78cb12d88b08fd6b61a80a3f055cae293ec2d15a37dbe7b3f9/diff/.pivot_root471672024: permission denied _______________________________________________ Podman mailing list -- podman@lists.podman.io To unsubscribe send an email to podman-leave@lists.podman.io
Perhaps user namesapce is not setup correctly. podman unshare cat /proc/self/uid_map
Hi I am using podman and running non-root ==> podman version Version: 2.2.1 API Version: 2 Go Version: go1.14.7 Built: Mon Feb 8 15:19:06 2021 OS/Arch: linux/amd64 I’ve loaded one docker image. But because of security and restrictions the building of that docker image I performed on my laptop. We have a local repository which as intense security scans of images which I will use as some point. So I downloaded the docker image I needed on my laptop. Exported the image and copied it to the server with podman. Then I ran LOAD to add the image. Import does not work because of the external registry. Thanks Kent Collins Office: 817.352.0251 | Enterprise Information Management | Cell: 817.879.7764 Data Solutions Architect/Scientist – Published Author and Conference Speaker “Death and life are in the power of the tongue: and they that love it shall eat the fruit thereof.” Prov 18:21 -----Original Message----- From: Daniel Walsh [mailto:dwalsh@redhat.com] Sent: Monday, April 26, 2021 5:58 AM To: podman@lists.podman.io Subject: [Podman] Re: Need help in creating a rootless container in podman External Message On 4/25/21 09:17, supravapanda@gmail.com<mailto:supravapanda@gmail.com> wrote:
I have tried all options.when run podman pull command as a normal user i get below error.but as sudo it works fine.
Can i know what need to done to run the command as a non root user..
atlvrmsbmld02:/home/orequest[ 53 ] --> podman pull
registry.access.redhat.com/ubi8/ubi
Trying to pull registry.access.redhat.com/ubi8/ubi:latest...
Getting image source signatures
Copying blob 4b21dcdd136d done
Copying blob 55eda7743468 done
Copying config 613e5da7a9 done
Writing manifest to image destination
Storing signatures
Error processing tar file(exit status 1): Error setting up pivot
dir: mkdir
/home/orequest/.local/share/containers/storage/overlay/476579af086aee7
8cb12d88b08fd6b61a80a3f055cae293ec2d15a37dbe7b3f9/diff/.pivot_root4716
72024: permission denied
Error: Error committing the finished image: error adding layer with
blob
"sha256:4b21dcdd136d133a4df0840e656af2f488c226dd384a98b89ced79064a4081
b4": Error processing tar file(exit status 1): Error setting up pivot
dir: mkdir
/home/orequest/.local/share/containers/storage/overlay/476579af086aee7
8cb12d88b08fd6b61a80a3f055cae293ec2d15a37dbe7b3f9/diff/.pivot_root4716
72024: permission denied
_______________________________________________
Podman mailing list -- podman@lists.podman.io<mailto:podman@lists.podman.io> To unsubscribe send an
email to podman-leave@lists.podman.io<mailto:podman-leave@lists.podman.io>
Perhaps user namesapce is not setup correctly. podman unshare cat /proc/self/uid_map _______________________________________________ Podman mailing list -- podman@lists.podman.io<mailto:podman@lists.podman.io> To unsubscribe send an email to podman-leave@lists.podman.io<mailto:podman-leave@lists.podman.io> <p></p>
participants (6)
-
Boyd Kelly -
Collins, Kent -
Daniel Walsh -
Jan Hutař -
Scott McCarty -
supravapanda@gmail.com