Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

trouble using podman cp on windows #15508

Closed
dancohen21 opened this issue Aug 26, 2022 · 4 comments
Closed

trouble using podman cp on windows #15508

dancohen21 opened this issue Aug 26, 2022 · 4 comments
Labels
locked - please file new issue/PR Assist humans wanting to comment on an old issue or PR with locked comments.

Comments

@dancohen21
Copy link

I'm using podman in windows with WSL as the podman machine.
the 'podman cp :/path' is not working.

podman cp d:\test.txt :/root/
results in Error: "\test.txt" could not be found on container d: No such file or directory

How can I specify a local file on windows to copy to a container

@rhatdan
Copy link
Member

rhatdan commented Aug 29, 2022

@baude PTAL, I think you were working on this?

@dancohen21 Please give us the output of podman info

@dancohen21
Copy link
Author

output of podman info from windows host

host:
arch: amd64
buildahVersion: 1.27.0-dev
cgroupControllers:

  • cpuset
  • cpu
  • cpuacct
  • blkio
  • memory
  • devices
  • freezer
  • net_cls
  • perf_event
  • net_prio
  • hugetlb
  • pids
  • rdma
    cgroupManager: cgroupfs
    cgroupVersion: v1
    conmon:
    package: conmon-2.1.1-2.fc35.x86_64
    path: /usr/bin/conmon
    version: 'conmon version 2.1.1, commit: '
    cpuUtilization:
    idlePercent: 99.96
    systemPercent: 0.03
    userPercent: 0.01
    cpus: 4
    distribution:
    distribution: fedora
    variant: container
    version: "35"
    eventLogger: file
    hostname: W103ZBRWP3
    idMappings:
    gidmap: null
    uidmap: null
    kernel: 5.10.102.1-microsoft-standard-WSL2
    linkmode: dynamic
    logDriver: journald
    memFree: 7590330368
    memTotal: 8336093184
    networkBackend: netavark
    ociRuntime:
    name: crun
    package: crun-1.4.5-2.fc35.x86_64
    path: /usr/bin/crun
    version: |-
    crun version 1.4.5
    commit: c381048530aa750495cf502ddb7181f2ded5b400
    spec: 1.0.0
    +SYSTEMD +SELINUX +APPARMOR +CAP +SECCOMP +EBPF +CRIU +YAJL
    os: linux
    remoteSocket:
    exists: true
    path: /run/podman/podman.sock
    security:
    apparmorEnabled: false
    capabilities: CAP_CHOWN,CAP_DAC_OVERRIDE,CAP_FOWNER,CAP_FSETID,CAP_KILL,CAP_NET_BIND_SERVICE,CAP_SETFCAP,CAP_SETGID,CAP_SETPCAP,CAP_SETUID,CAP_SYS_CHROOT
    rootless: false
    seccompEnabled: true
    seccompProfilePath: /usr/share/containers/seccomp.json
    selinuxEnabled: false
    serviceIsRemote: true
    slirp4netns:
    executable: /usr/bin/slirp4netns
    package: slirp4netns-1.1.12-2.fc35.x86_64
    version: |-
    slirp4netns version 1.1.12
    commit: 7a104a101aa3278a2152351a082a6df71f57c9a3
    libslirp: 4.6.1
    SLIRP_CONFIG_VERSION_MAX: 3
    libseccomp: 2.5.3
    swapFree: 2147483648
    swapTotal: 2147483648
    uptime: 64h 23m 29.00s (Approximately 2.67 days)
    plugins:
    log:
  • k8s-file
  • none
  • passthrough
  • journald
    network:
  • bridge
  • macvlan
    volume:
  • local
    registries:
    search:
  • registry.fedoraproject.org
  • registry.access.redhat.com
  • docker.io
  • quay.io
    store:
    configFile: /etc/containers/storage.conf
    containerStore:
    number: 4
    paused: 0
    running: 1
    stopped: 3
    graphDriverName: overlay
    graphOptions:
    overlay.mountopt: nodev,metacopy=on
    graphRoot: /var/lib/containers/storage
    graphRootAllocated: 269490393088
    graphRootUsed: 2112856064
    graphStatus:
    Backing Filesystem: extfs
    Native Overlay Diff: "false"
    Supports d_type: "true"
    Using metacopy: "true"
    imageCopyTmpDir: /var/tmp
    imageStore:
    number: 11
    runRoot: /run/containers/storage
    volumePath: /var/lib/containers/storage/volumes
    version:
    APIVersion: 4.2.0-rc1
    Built: 1657573135
    BuiltTime: Mon Jul 11 14:58:55 2022
    GitCommit: ""
    GoVersion: go1.16.15
    Os: linux
    OsArch: linux/amd64
    Version: 4.2.0-rc1

@baude
Copy link
Member

baude commented Aug 29, 2022

this was fixed recently in #15455 and will be available in the next release.

@baude baude closed this as completed Aug 29, 2022
@dancohen21
Copy link
Author

@rhatdan @baude
Just installed 4.3.0 on windows [with WSL]
my laptop has a "c" drive and a "d" drive
I'm trying to copy a file from my "d" drive to my container "se92"

this command works. It runs from the context of the podman-machine-default.
wsl -d podman-machine-default -u user enterns podman cp /mnt/d/2022_Projects/CCCC/1861_symapi_db_20221021.bin se92:/root/

this command is not working. running from the remote podman tools in windows proper context
podman cp 'D:\2022_Projects\CCCC\1272_symapi_db_20221021.bin' se92:/root/test.bin
Error: container "D" does not exist

this command is not working either:
podman cp .\1272_symapi_db_20221021.bin se92:/root/test.bin
error rewriting "D:\2022_Projects\CCCC\1272_symapi_db_20221021.bin" to be relative to "/": expected root directory to be an absolute path, got "/"

nor
podman cp /mnt/d/2022_Projects/CCCC/1272_symapi_db_20221021.bin se92:/root/test.bin

Is there a syntax I'm missing?
the in-context help says:
You can copy from the container's file system to the local machine or the reverse, from the local filesystem to the container.

@github-actions github-actions bot added the locked - please file new issue/PR Assist humans wanting to comment on an old issue or PR with locked comments. label Sep 12, 2023
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Sep 12, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
locked - please file new issue/PR Assist humans wanting to comment on an old issue or PR with locked comments.
Projects
None yet
Development

No branches or pull requests

3 participants