DEV Community

josnin
josnin

Posted on

Podman $XDG_RUNTIME_DIR not set

OS

Fedora 31

Work around

To add the command
su root
vim /etc/bashrc
export XDG_RUNTIME_DIR=/run/user/$UID
Enter fullscreen mode Exit fullscreen mode
su root
mkdir /run/user/1002
chown johnny2020:johnny2020 1002
chmod 700 1002
Enter fullscreen mode Exit fullscreen mode

Create storage.conf

su johnny2020
vim ~/.config/containers/storage.conf

[storage]
  driver = "overlay"
  runroot = "/run/user/1002/containers"
  graphroot = "/home/johnny2020/.local/share/containers/storage"
  [storage.options]
    size = ""
    remap-uids = ""
    remap-gids = ""
    ignore_chown_errors = ""
    remap-user = ""
    remap-group = ""
    skip_mount_home = ""
    mount_program = "/usr/bin/fuse-overlayfs"
    mountopt = ""
    [storage.options.aufs]
      mountopt = ""
    [storage.options.btrfs]
      min_space = ""
      size = ""
    [storage.options.thinpool]
      autoextend_percent = ""
      autoextend_threshold = ""
      basesize = ""
      blocksize = ""
      directlvm_device = ""
      directlvm_device_force = ""
      fs = ""
      log_level = ""
      min_free_space = ""
      mkfsarg = ""
      mountopt = ""
      size = ""
      use_deferred_deletion = ""
      use_deferred_removal = ""
      xfs_nospace_max_retries = ""
    [storage.options.overlay]
      ignore_chown_errors = ""
      mountopt = ""
      mount_program = ""
      size = ""
      skip_mount_home = ""
    [storage.options.vfs]
      ignore_chown_errors = ""
    [storage.options.zfs]
      mountopt = ""
      fsname = ""
      size = ""

Enter fullscreen mode Exit fullscreen mode

It will only create the directory /run/user/$UID if you login via ssh

Networking

container-networking-podman

podman cp

[johnny2020@localhost ~]$ podman cp --pause /home/jos/myfile testpo:/tmp/
Error: invalid arguments /home/johnny2020/myfile, testpo:/tmp/ you must use just one container
[johnny2020@localhost ~]$ podman cp --pause /home/johnny2020/emyfile testpo:/tmp/
Error: invalid arguments /home/johnny2020/emyfile, testpo:/tmp/ you must use just one container
[johnny2020@localhost ~]$ podman cp --pause /home/johnny2020/myfile testpo:/tmp/
Error: invalid arguments /home/johnny2020/myfile, testpo:/tmp/ you must use just one container
[johnny2020@localhost ~]$ podman cp --pause /home/johnny2020/myfile /tmp
Error: invalid arguments /home/johnny2020/myfile, /tmp you must use just one container
[johnny2020@localhost ~]$ podman ps
CONTAINER ID  IMAGE                           COMMAND               CREATED         STATUS             PORTS                  NAMES
b73dc0a99f2f  docker.io/library/nginx:latest  nginx -g daemon o...  17 minutes ago  Up 13 minutes ago  0.0.0.0:37895->80/tcp  testpos
[johnny2020@localhost ~]$ podman cp --pause /home/johnny2020/myfile b73dc0a99f2f:/tmp/
Error: can not pause containers on rootless containers with cgroup V1: this container does not have a cgroup
[johnny2020@localhost ~]$ podman cp /home/johnny2020/myfile b73dc0a99f2f:/tmp/
[johnny2020@localhost ~]$

Enter fullscreen mode Exit fullscreen mode

Top comments (0)