“Docker -Datei vom Container zum Host kopieren” Code-Antworten

Kopieren Sie Dateien mit CMD aus einem Docker -Container in den Host -Computer

docker cp <containerId>:/file/path/within/container /host/path/target
Jealous Jaguar

Docker -Kopie vom Container zum Host

# container to host
ocker cp <containerId>:/file/path/within/container /host/path/target

# host to container
docker cp /host/local/path/file <containerId>:/file/path/in/container/file
DreamCoder

Kopieren Sie die Datei vom Host zum Docker -Container

docker cp foo.txt mycontainer:/foo.txt
Fragile Fox

Kopieren Sie eine Datei vom lokalen Computer zum Docker -Container

docker cp <Path in the local machine> <Container ID>:<Path of file inside the container>
Zany Zebra

Docker -Datei vom Container zum Host kopieren

$ docker run -d --name httpd httpd

$ docker exec httpd pwd
/usr/local/apache2

$ docker exec httpd ls
bin
build
cgi-bin
conf
error
htdocs
icons
include
logs
modules

$ docker cp httpd:/usr/local/apache2/conf .
Tautvydas Slegaitis

Docker: Kopieren von Dateien vom Docker -Container zum Host

for copy file from a container to the host use the command
docker cp <containerId>:/file/path/within/container /host/path/target

You can also use (part of) the Container ID. The following command is equivalent to the first
sudo docker cp 1b4a:/out_read.jpg .


shafeeque

Ähnliche Antworten wie “Docker -Datei vom Container zum Host kopieren”

Fragen ähnlich wie “Docker -Datei vom Container zum Host kopieren”

Weitere verwandte Antworten zu “Docker -Datei vom Container zum Host kopieren” auf Shell/Bash

Durchsuchen Sie beliebte Code-Antworten nach Sprache

Durchsuchen Sie andere Codesprachen