{"id":1219,"date":"2024-07-22T20:46:25","date_gmt":"2024-07-22T20:46:25","guid":{"rendered":"https:\/\/dockerpros.com\/?post_type=glossary&#038;p=1219"},"modified":"2024-07-22T20:51:38","modified_gmt":"2024-07-22T20:51:38","slug":"docker-container-cp","status":"publish","type":"glossary","link":"https:\/\/dockerpros.com\/fr\/wiki\/docker-container-cp\/","title":{"rendered":"Docker Container CP"},"content":{"rendered":"<h1>Un regard approfondi sur le CP des conteneurs Docker<\/h1>\n<p>Docker is an open-source platform that automates the deployment, <span class=\"glossaryai-tooltip glossary-term-696\"><span class=\"glossaryai-link\"><a href=\"https:\/\/dockerpros.com\/fr\/wiki\/scaling\/\" target=\"_blank\">scaling<\/a><\/span><span class=\"gai-content-hidden glossaryai-tooltip-content\"><span class=\"gai-tooltip-body\"><span class=\"glossaryai-tooltip-text\">Scaling refers to the process of adjusting the capacity of a system to accommodate varying loads. It can be achieved through vertical scaling, which enhances existing resources, or horizontal scaling, which adds additional resources.<span class=\"glossaryai-more-link\"> <a href=\"https:\/\/dockerpros.com\/fr\/wiki\/scaling\/\">More \u00bb<\/a><\/span><\/span><\/span><\/span><\/span>, et la gestion des applications au sein de conteneurs l\u00e9gers et portables. Parmi les diff\u00e9rentes commandes que Docker propose, <code>docker cp<\/code> stands out as a crucial utility for developers and system administrators working with containerized applications. The <code>docker cp<\/code> command allows users to <span class=\"glossaryai-tooltip glossary-term-673\"><span class=\"glossaryai-link\"><a href=\"https:\/\/dockerpros.com\/fr\/wiki\/copy\/\" target=\"_blank\">copie<\/a><\/span><span class=\"gai-content-hidden glossaryai-tooltip-content\"><span class=\"gai-tooltip-body\"><span class=\"glossaryai-tooltip-text\">COPY is a command in computer programming and data management that facilitates the duplication of files or data from one location to another, ensuring data integrity and accessibility.<span class=\"glossaryai-more-link\"> <a href=\"https:\/\/dockerpros.com\/fr\/wiki\/copy\/\">More \u00bb<\/a><\/span><\/span><\/span><\/span><\/span> fichiers et r\u00e9pertoires entre les conteneurs et le syst\u00e8me de fichiers h\u00f4te, permettant une int\u00e9gration et une gestion transparentes des donn\u00e9es dans un environnement conteneuris\u00e9.<\/p>\n<h2>Understanding Docker and Its Architecture<\/h2>\n<p>Before delving into the specifics of <code>docker cp<\/code>, il est essentiel de comprendre le contexte plus large de Docker et de son architecture. Docker fonctionne selon un mod\u00e8le client-serveur, comprenant trois composants principaux :<\/p>\n<ol>\n<li><strong>Docker Client<\/strong>: The command-line interface (CLI) that users interact with to issue Docker commands.<\/li>\n<li><strong>Docker <span class=\"glossaryai-tooltip glossary-term-667\"><span class=\"glossaryai-link\"><a href=\"https:\/\/dockerpros.com\/fr\/wiki\/daemon\/\" target=\"_blank\">Daemon<\/a><\/span><span class=\"gai-content-hidden glossaryai-tooltip-content\"><span class=\"gai-tooltip-body\"><span class=\"glossaryai-tooltip-text\">Un d\u00e9mon est un processus d'arri\u00e8re-plan en informatique qui s'ex\u00e9cute de mani\u00e8re autonome, effectuant des t\u00e2ches sans intervention de l'utilisateur. Il g\u00e8re g\u00e9n\u00e9ralement des fonctions au niveau du syst\u00e8me ou de l'application, am\u00e9liorant ainsi l'efficacit\u00e9.<span class=\"glossaryai-more-link\"> <a href=\"https:\/\/dockerpros.com\/fr\/wiki\/daemon\/\">More \u00bb<\/a><\/span><\/span><\/span><\/span><\/span><\/strong>L'arri\u00e8re-plan <span class=\"glossaryai-tooltip glossary-term-681\"><span class=\"glossaryai-link\"><a href=\"https:\/\/dockerpros.com\/fr\/wiki\/service\/\" target=\"_blank\">service<\/a><\/span><span class=\"gai-content-hidden glossaryai-tooltip-content\"><span class=\"gai-tooltip-body\"><span class=\"glossaryai-tooltip-text\">Le service fait r\u00e9f\u00e9rence \u00e0 l'acte de fournir une assistance ou un soutien pour r\u00e9pondre \u00e0 des besoins ou des exigences sp\u00e9cifiques. Dans divers domaines, il englobe le service client, le support technique et les services professionnels, en mettant l'accent sur l'efficacit\u00e9 et la satisfaction de l'utilisateur.<span class=\"glossaryai-more-link\"> <a href=\"https:\/\/dockerpros.com\/fr\/wiki\/service\/\">More \u00bb<\/a><\/span><\/span><\/span><\/span><\/span> responsable de la gestion des conteneurs, images, r\u00e9seaux et volumes Docker.<\/li>\n<li><strong><span class=\"glossaryai-tooltip glossary-term-736\"><span class=\"glossaryai-link\"><a href=\"https:\/\/dockerpros.com\/fr\/wiki\/docker-registry\/\" target=\"_blank\">Docker Registry<\/a><\/span><span class=\"gai-content-hidden glossaryai-tooltip-content\"><span class=\"gai-tooltip-body\"><span class=\"glossaryai-tooltip-text\">A Docker Registry is a storage and distribution system for Docker images. It allows developers to upload, manage, and share container images, facilitating efficient deployment in diverse environments.<span class=\"glossaryai-more-link\"> <a href=\"https:\/\/dockerpros.com\/fr\/wiki\/docker-registry\/\">More \u00bb<\/a><\/span><\/span><\/span><\/span><\/span><\/strong>: A <span class=\"glossaryai-tooltip glossary-term-659\"><span class=\"glossaryai-link\"><a href=\"https:\/\/dockerpros.com\/fr\/wiki\/repository\/\" target=\"_blank\">repository<\/a><\/span><span class=\"gai-content-hidden glossaryai-tooltip-content\"><span class=\"gai-tooltip-body\"><span class=\"glossaryai-tooltip-text\">A repository is a centralized location where data, code, or documents are stored, managed, and maintained. It facilitates version control, collaboration, and efficient resource sharing among users.<span class=\"glossaryai-more-link\"> <a href=\"https:\/\/dockerpros.com\/fr\/wiki\/repository\/\">More \u00bb<\/a><\/span><\/span><span class=\"gai-tooltip-video-wrapper\"><span class=\"gai-tooltip-video\" data-src=\"https:\/\/www.youtube.com\/embed\/_OXj8BGxNPY?rel=0&#038;modestbranding=1\"><\/span><\/span><\/span><\/span><\/span> pour le stockage et la distribution d'images Docker.<\/li>\n<\/ol>\n<p>Les conteneurs sont des instances d'images Docker cr\u00e9\u00e9es \u00e0 partir d'un ensemble d\u00e9fini d'instructions dans un <span class=\"glossaryai-tooltip glossary-term-652\"><span class=\"glossaryai-link\"><a href=\"https:\/\/dockerpros.com\/fr\/wiki\/dockerfile\/\" target=\"_blank\">Dockerfile<\/a><\/span><span class=\"gai-content-hidden glossaryai-tooltip-content\"><span class=\"gai-tooltip-body\"><span class=\"glossaryai-tooltip-text\">A Dockerfile is a script containing a series of instructions to automate the creation of Docker images. It specifies the base image, application dependencies, and configuration, facilitating consistent deployment across environments.<span class=\"glossaryai-more-link\"> <a href=\"https:\/\/dockerpros.com\/fr\/wiki\/dockerfile\/\">More \u00bb<\/a><\/span><\/span><\/span><\/span><\/span>. Elles encapsulent une application et ses d\u00e9pendances, assurant la coh\u00e9rence entre diff\u00e9rents environnements.<\/p>\n<h2>Le r\u00f4le de <code>docker cp<\/code><\/h2>\n<p>The <code>docker cp<\/code> command sert de pont entre le syst\u00e8me de fichiers h\u00f4te et le <span class=\"glossaryai-tooltip glossary-term-650\"><span class=\"glossaryai-link\"><a href=\"https:\/\/dockerpros.com\/fr\/wiki\/container\/\" target=\"_blank\">conteneur<\/a><\/span><span class=\"gai-content-hidden glossaryai-tooltip-content\"><span class=\"gai-tooltip-body\"><span class=\"glossaryai-tooltip-text\">Containers are lightweight, portable units that encapsulate software and its dependencies, enabling consistent execution across different environments. They leverage OS-level virtualization for efficiency.<span class=\"glossaryai-more-link\"> <a href=\"https:\/\/dockerpros.com\/fr\/wiki\/container\/\">More \u00bb<\/a><\/span><\/span><\/span><\/span><\/span> filesystem. It provides a mechanism to <span class=\"glossaryai-tooltip glossary-term-673\"><span class=\"glossaryai-link\"><a href=\"https:\/\/dockerpros.com\/fr\/wiki\/copy\/\" target=\"_blank\">copie<\/a><\/span><span class=\"gai-content-hidden glossaryai-tooltip-content\"><span class=\"gai-tooltip-body\"><span class=\"glossaryai-tooltip-text\">COPY is a command in computer programming and data management that facilitates the duplication of files or data from one location to another, ensuring data integrity and accessibility.<span class=\"glossaryai-more-link\"> <a href=\"https:\/\/dockerpros.com\/fr\/wiki\/copy\/\">More \u00bb<\/a><\/span><\/span><\/span><\/span><\/span> files to and from containers, address the challenges of data persistence, and facilitate the transfer of essential configuration files, logs, and other necessary data.<\/p>\n<h3>Cas d'utilisation pour <code>docker cp<\/code><\/h3>\n<ol>\n<li>\n<p><strong>D\u00e9bogage<\/strong>: When troubleshooting applications running in containers, developers often need to access logs or configuration files. <code>docker cp<\/code> allows for quick retrieval of these files without needing to exec into the <span class=\"glossaryai-tooltip glossary-term-650\"><span class=\"glossaryai-link\"><a href=\"https:\/\/dockerpros.com\/fr\/wiki\/container\/\" target=\"_blank\">conteneur<\/a><\/span><span class=\"gai-content-hidden glossaryai-tooltip-content\"><span class=\"gai-tooltip-body\"><span class=\"glossaryai-tooltip-text\">Containers are lightweight, portable units that encapsulate software and its dependencies, enabling consistent execution across different environments. They leverage OS-level virtualization for efficiency.<span class=\"glossaryai-more-link\"> <a href=\"https:\/\/dockerpros.com\/fr\/wiki\/container\/\">More \u00bb<\/a><\/span><\/span><\/span><\/span><\/span>.<\/p>\n<\/li>\n<li>\n<p><strong>Gestion de configuration<\/strong>: Dans les sc\u00e9narios o\u00f9 les fichiers de configuration doivent \u00eatre modifi\u00e9s, <code>docker cp<\/code> enables users to <span class=\"glossaryai-tooltip glossary-term-673\"><span class=\"glossaryai-link\"><a href=\"https:\/\/dockerpros.com\/fr\/wiki\/copy\/\" target=\"_blank\">copie<\/a><\/span><span class=\"gai-content-hidden glossaryai-tooltip-content\"><span class=\"gai-tooltip-body\"><span class=\"glossaryai-tooltip-text\">COPY is a command in computer programming and data management that facilitates the duplication of files or data from one location to another, ensuring data integrity and accessibility.<span class=\"glossaryai-more-link\"> <a href=\"https:\/\/dockerpros.com\/fr\/wiki\/copy\/\">More \u00bb<\/a><\/span><\/span><\/span><\/span><\/span> updated files from their local environment into the <span class=\"glossaryai-tooltip glossary-term-650\"><span class=\"glossaryai-link\"><a href=\"https:\/\/dockerpros.com\/fr\/wiki\/container\/\" target=\"_blank\">conteneur<\/a><\/span><span class=\"gai-content-hidden glossaryai-tooltip-content\"><span class=\"gai-tooltip-body\"><span class=\"glossaryai-tooltip-text\">Containers are lightweight, portable units that encapsulate software and its dependencies, enabling consistent execution across different environments. They leverage OS-level virtualization for efficiency.<span class=\"glossaryai-more-link\"> <a href=\"https:\/\/dockerpros.com\/fr\/wiki\/container\/\">More \u00bb<\/a><\/span><\/span><\/span><\/span><\/span>.<\/p>\n<\/li>\n<li>\n<p><strong>Migration de donn\u00e9es<\/strong>: For applications that require data migration, the command allows for easy transfer of files between the host and the <span class=\"glossaryai-tooltip glossary-term-650\"><span class=\"glossaryai-link\"><a href=\"https:\/\/dockerpros.com\/fr\/wiki\/container\/\" target=\"_blank\">conteneur<\/a><\/span><span class=\"gai-content-hidden glossaryai-tooltip-content\"><span class=\"gai-tooltip-body\"><span class=\"glossaryai-tooltip-text\">Containers are lightweight, portable units that encapsulate software and its dependencies, enabling consistent execution across different environments. They leverage OS-level virtualization for efficiency.<span class=\"glossaryai-more-link\"> <a href=\"https:\/\/dockerpros.com\/fr\/wiki\/container\/\">More \u00bb<\/a><\/span><\/span><\/span><\/span><\/span>, facilitating updates or backups.<\/p>\n<\/li>\n<li>\n<p><strong>Partage de donn\u00e9es entre conteneurs\n\nIl existe plusieurs fa\u00e7ons de partager des donn\u00e9es entre conteneurs. La plus simple consiste \u00e0 utiliser le r\u00e9pertoire de travail du conteneur comme un volume partag\u00e9. Pour ce faire, vous pouvez utiliser l'option --volumes-from lors de la cr\u00e9ation d'un nouveau conteneur. Cette option permet de monter les volumes d'un conteneur existant dans le nouveau conteneur.\n\nPar exemple, supposons que vous ayez un conteneur nomm\u00e9 \"data_container\" qui contient des donn\u00e9es que vous souhaitez partager avec un autre conteneur. Vous pouvez cr\u00e9er un nouveau conteneur nomm\u00e9 \"app_container\" et monter les volumes du \"data_container\" en utilisant l'option --volumes-from :\n\ndocker run -it --name app_container --volumes-from data_container ubuntu bash\n\nDans cet exemple, le conteneur \"app_container\" sera cr\u00e9\u00e9 avec les volumes du \"data_container\" mont\u00e9s \u00e0 l'int\u00e9rieur. Vous pouvez maintenant acc\u00e9der aux donn\u00e9es partag\u00e9es depuis le \"app_container\".\n\nUne autre fa\u00e7on de partager des donn\u00e9es entre conteneurs est d'utiliser des volumes nomm\u00e9s. Les volumes nomm\u00e9s sont des volumes qui ne sont pas li\u00e9s \u00e0 un conteneur sp\u00e9cifique, mais qui peuvent \u00eatre mont\u00e9s dans plusieurs conteneurs. Pour cr\u00e9er un volume nomm\u00e9, vous pouvez utiliser la commande docker volume create :\n\ndocker volume create my_volume\n\nUne fois le volume nomm\u00e9 cr\u00e9\u00e9, vous pouvez le monter dans un conteneur en utilisant l'option -v :\n\ndocker run -it -v my_volume:\/data ubuntu bash\n\nDans cet exemple, le volume nomm\u00e9 \"my_volume\" sera mont\u00e9 dans le conteneur \u00e0 l'emplacement \/data. Vous pouvez maintenant acc\u00e9der aux donn\u00e9es partag\u00e9es depuis le conteneur.\n\nIl est important de noter que les volumes nomm\u00e9s sont persistants, ce qui signifie que les donn\u00e9es qu'ils contiennent seront conserv\u00e9es m\u00eame si le conteneur est supprim\u00e9. Cela les rend particuli\u00e8rement utiles pour le stockage de donn\u00e9es importantes ou pour le partage de donn\u00e9es entre plusieurs conteneurs.\n\nEnfin, vous pouvez \u00e9galement utiliser des liens symboliques pour partager des donn\u00e9es entre conteneurs. Les liens symboliques sont des r\u00e9f\u00e9rences \u00e0 des fichiers ou des r\u00e9pertoires qui se trouvent dans un autre conteneur. Pour cr\u00e9er un lien symbolique, vous pouvez utiliser la commande ln -s :\n\nln -s \/path\/to\/data \/path\/to\/link\n\nDans cet exemple, un lien symbolique nomm\u00e9 \"link\" sera cr\u00e9\u00e9 dans le r\u00e9pertoire \/path\/to\/link, qui pointe vers le r\u00e9pertoire \/path\/to\/data. Vous pouvez maintenant acc\u00e9der aux donn\u00e9es partag\u00e9es depuis le conteneur en utilisant le lien symbolique.\n\nIl est important de noter que les liens symboliques ne sont pas persistants, ce qui signifie que les donn\u00e9es qu'ils pointent seront perdues si le conteneur source est supprim\u00e9. Cela les rend moins adapt\u00e9s pour le stockage de donn\u00e9es importantes ou pour le partage de donn\u00e9es entre plusieurs conteneurs.\n\nEn conclusion, il existe plusieurs fa\u00e7ons de partager des donn\u00e9es entre conteneurs, chacune ayant ses propres avantages et inconv\u00e9nients. Le choix de la m\u00e9thode d\u00e9pendra de vos besoins sp\u00e9cifiques et de la nature des donn\u00e9es que vous souhaitez partager.<\/strong>: When dealing with multiple containers that require access to the same files, <code>docker cp<\/code> can be used to <span class=\"glossaryai-tooltip glossary-term-673\"><span class=\"glossaryai-link\"><a href=\"https:\/\/dockerpros.com\/fr\/wiki\/copy\/\" target=\"_blank\">copie<\/a><\/span><span class=\"gai-content-hidden glossaryai-tooltip-content\"><span class=\"gai-tooltip-body\"><span class=\"glossaryai-tooltip-text\">COPY is a command in computer programming and data management that facilitates the duplication of files or data from one location to another, ensuring data integrity and accessibility.<span class=\"glossaryai-more-link\"> <a href=\"https:\/\/dockerpros.com\/fr\/wiki\/copy\/\">More \u00bb<\/a><\/span><\/span><\/span><\/span><\/span> files from one <span class=\"glossaryai-tooltip glossary-term-650\"><span class=\"glossaryai-link\"><a href=\"https:\/\/dockerpros.com\/fr\/wiki\/container\/\" target=\"_blank\">conteneur<\/a><\/span><span class=\"gai-content-hidden glossaryai-tooltip-content\"><span class=\"gai-tooltip-body\"><span class=\"glossaryai-tooltip-text\">Containers are lightweight, portable units that encapsulate software and its dependencies, enabling consistent execution across different environments. They leverage OS-level virtualization for efficiency.<span class=\"glossaryai-more-link\"> <a href=\"https:\/\/dockerpros.com\/fr\/wiki\/container\/\">More \u00bb<\/a><\/span><\/span><\/span><\/span><\/span> to another.<\/p>\n<\/li>\n<\/ol>\n<h2>Syntaxe de <code>docker cp<\/code><\/h2>\n<p>La syntaxe de base du <code>docker cp<\/code> command is as follows:<\/p>\n<pre><code class=\"language-bash\">docker cp :<\/code><\/pre>\n<p>Or conversely, to <span class=\"glossaryai-tooltip glossary-term-673\"><span class=\"glossaryai-link\"><a href=\"https:\/\/dockerpros.com\/fr\/wiki\/copy\/\" target=\"_blank\">copie<\/a><\/span><span class=\"gai-content-hidden glossaryai-tooltip-content\"><span class=\"gai-tooltip-body\"><span class=\"glossaryai-tooltip-text\">COPY is a command in computer programming and data management that facilitates the duplication of files or data from one location to another, ensuring data integrity and accessibility.<span class=\"glossaryai-more-link\"> <a href=\"https:\/\/dockerpros.com\/fr\/wiki\/copy\/\">More \u00bb<\/a><\/span><\/span><\/span><\/span><\/span> de <span class=\"glossaryai-tooltip glossary-term-650\"><span class=\"glossaryai-link\"><a href=\"https:\/\/dockerpros.com\/fr\/wiki\/container\/\" target=\"_blank\">conteneur<\/a><\/span><span class=\"gai-content-hidden glossaryai-tooltip-content\"><span class=\"gai-tooltip-body\"><span class=\"glossaryai-tooltip-text\">Containers are lightweight, portable units that encapsulate software and its dependencies, enabling consistent execution across different environments. They leverage OS-level virtualization for efficiency.<span class=\"glossaryai-more-link\"> <a href=\"https:\/\/dockerpros.com\/fr\/wiki\/container\/\">More \u00bb<\/a><\/span><\/span><\/span><\/span><\/span> \u00e0 l'h\u00f4te :<\/p>\n<pre><code class=\"language-bash\">docker cp : <\/code><\/pre>\n<h3>Parameters Explained<\/h3>\n<ul>\n<li>&#8220;: The path of the file or directory you want to <span class=\"glossaryai-tooltip glossary-term-673\"><span class=\"glossaryai-link\"><a href=\"https:\/\/dockerpros.com\/fr\/wiki\/copy\/\" target=\"_blank\">copie<\/a><\/span><span class=\"gai-content-hidden glossaryai-tooltip-content\"><span class=\"gai-tooltip-body\"><span class=\"glossaryai-tooltip-text\">COPY is a command in computer programming and data management that facilitates the duplication of files or data from one location to another, ensuring data integrity and accessibility.<span class=\"glossaryai-more-link\"> <a href=\"https:\/\/dockerpros.com\/fr\/wiki\/copy\/\">More \u00bb<\/a><\/span><\/span><\/span><\/span><\/span>. This can be either a local path (when copying from the host to the <span class=\"glossaryai-tooltip glossary-term-650\"><span class=\"glossaryai-link\"><a href=\"https:\/\/dockerpros.com\/fr\/wiki\/container\/\" target=\"_blank\">conteneur<\/a><\/span><span class=\"gai-content-hidden glossaryai-tooltip-content\"><span class=\"gai-tooltip-body\"><span class=\"glossaryai-tooltip-text\">Containers are lightweight, portable units that encapsulate software and its dependencies, enabling consistent execution across different environments. They leverage OS-level virtualization for efficiency.<span class=\"glossaryai-more-link\"> <a href=\"https:\/\/dockerpros.com\/fr\/wiki\/container\/\">More \u00bb<\/a><\/span><\/span><\/span><\/span><\/span>) or a path inside the <span class=\"glossaryai-tooltip glossary-term-650\"><span class=\"glossaryai-link\"><a href=\"https:\/\/dockerpros.com\/fr\/wiki\/container\/\" target=\"_blank\">conteneur<\/a><\/span><span class=\"gai-content-hidden glossaryai-tooltip-content\"><span class=\"gai-tooltip-body\"><span class=\"glossaryai-tooltip-text\">Containers are lightweight, portable units that encapsulate software and its dependencies, enabling consistent execution across different environments. They leverage OS-level virtualization for efficiency.<span class=\"glossaryai-more-link\"> <a href=\"https:\/\/dockerpros.com\/fr\/wiki\/container\/\">More \u00bb<\/a><\/span><\/span><\/span><\/span><\/span> (when copying from the <span class=\"glossaryai-tooltip glossary-term-650\"><span class=\"glossaryai-link\"><a href=\"https:\/\/dockerpros.com\/fr\/wiki\/container\/\" target=\"_blank\">conteneur<\/a><\/span><span class=\"gai-content-hidden glossaryai-tooltip-content\"><span class=\"gai-tooltip-body\"><span class=\"glossaryai-tooltip-text\">Containers are lightweight, portable units that encapsulate software and its dependencies, enabling consistent execution across different environments. They leverage OS-level virtualization for efficiency.<span class=\"glossaryai-more-link\"> <a href=\"https:\/\/dockerpros.com\/fr\/wiki\/container\/\">More \u00bb<\/a><\/span><\/span><\/span><\/span><\/span> to the host).<\/li>\n<li>&#8220;: The name or ID of the <span class=\"glossaryai-tooltip glossary-term-650\"><span class=\"glossaryai-link\"><a href=\"https:\/\/dockerpros.com\/fr\/wiki\/container\/\" target=\"_blank\">conteneur<\/a><\/span><span class=\"gai-content-hidden glossaryai-tooltip-content\"><span class=\"gai-tooltip-body\"><span class=\"glossaryai-tooltip-text\">Containers are lightweight, portable units that encapsulate software and its dependencies, enabling consistent execution across different environments. They leverage OS-level virtualization for efficiency.<span class=\"glossaryai-more-link\"> <a href=\"https:\/\/dockerpros.com\/fr\/wiki\/container\/\">More \u00bb<\/a><\/span><\/span><\/span><\/span><\/span> you are targeting.<\/li>\n<li>&#8220;: The directory path where the file or directory will be copied. This should be specified according to the context of the <span class=\"glossaryai-tooltip glossary-term-673\"><span class=\"glossaryai-link\"><a href=\"https:\/\/dockerpros.com\/fr\/wiki\/copy\/\" target=\"_blank\">copie<\/a><\/span><span class=\"gai-content-hidden glossaryai-tooltip-content\"><span class=\"gai-tooltip-body\"><span class=\"glossaryai-tooltip-text\">COPY is a command in computer programming and data management that facilitates the duplication of files or data from one location to another, ensuring data integrity and accessibility.<span class=\"glossaryai-more-link\"> <a href=\"https:\/\/dockerpros.com\/fr\/wiki\/copy\/\">More \u00bb<\/a><\/span><\/span><\/span><\/span><\/span> operation.<\/li>\n<\/ul>\n<h2>Exemples pratiques<\/h2>\n<p>Pour mieux comprendre le potentiel de <code>docker cp<\/code>, explorons quelques exemples pratiques qui d\u00e9montrent son utilisation.<\/p>\n<h3>Example 1: Copying a File from Host to Container<\/h3>\n<p>Suppose you have a configuration file named <code>nginx.conf<\/code> on your local machine, and you want to <span class=\"glossaryai-tooltip glossary-term-673\"><span class=\"glossaryai-link\"><a href=\"https:\/\/dockerpros.com\/fr\/wiki\/copy\/\" target=\"_blank\">copie<\/a><\/span><span class=\"gai-content-hidden glossaryai-tooltip-content\"><span class=\"gai-tooltip-body\"><span class=\"glossaryai-tooltip-text\">COPY is a command in computer programming and data management that facilitates the duplication of files or data from one location to another, ensuring data integrity and accessibility.<span class=\"glossaryai-more-link\"> <a href=\"https:\/\/dockerpros.com\/fr\/wiki\/copy\/\">More \u00bb<\/a><\/span><\/span><\/span><\/span><\/span> it to a running NGINX <span class=\"glossaryai-tooltip glossary-term-650\"><span class=\"glossaryai-link\"><a href=\"https:\/\/dockerpros.com\/fr\/wiki\/container\/\" target=\"_blank\">conteneur<\/a><\/span><span class=\"gai-content-hidden glossaryai-tooltip-content\"><span class=\"gai-tooltip-body\"><span class=\"glossaryai-tooltip-text\">Containers are lightweight, portable units that encapsulate software and its dependencies, enabling consistent execution across different environments. They leverage OS-level virtualization for efficiency.<span class=\"glossaryai-more-link\"> <a href=\"https:\/\/dockerpros.com\/fr\/wiki\/container\/\">More \u00bb<\/a><\/span><\/span><\/span><\/span><\/span> nomm\u00e9 <code>my_nginx<\/code>.<\/p>\n<pre><code class=\"language-bash\">docker cp .\/nginx.conf my_nginx:\/etc\/nginx\/nginx.conf<\/code><\/pre>\n<p>In this command, the NGINX configuration file is copied from your host to the appropriate directory inside the <span class=\"glossaryai-tooltip glossary-term-650\"><span class=\"glossaryai-link\"><a href=\"https:\/\/dockerpros.com\/fr\/wiki\/container\/\" target=\"_blank\">conteneur<\/a><\/span><span class=\"gai-content-hidden glossaryai-tooltip-content\"><span class=\"gai-tooltip-body\"><span class=\"glossaryai-tooltip-text\">Containers are lightweight, portable units that encapsulate software and its dependencies, enabling consistent execution across different environments. They leverage OS-level virtualization for efficiency.<span class=\"glossaryai-more-link\"> <a href=\"https:\/\/dockerpros.com\/fr\/wiki\/container\/\">More \u00bb<\/a><\/span><\/span><\/span><\/span><\/span>.<\/p>\n<h3>Exemple 2 : Copier un fichier du conteneur vers l'h\u00f4te<\/h3>\n<p>If you want to retrieve a log file from the same NGINX <span class=\"glossaryai-tooltip glossary-term-650\"><span class=\"glossaryai-link\"><a href=\"https:\/\/dockerpros.com\/fr\/wiki\/container\/\" target=\"_blank\">conteneur<\/a><\/span><span class=\"gai-content-hidden glossaryai-tooltip-content\"><span class=\"gai-tooltip-body\"><span class=\"glossaryai-tooltip-text\">Containers are lightweight, portable units that encapsulate software and its dependencies, enabling consistent execution across different environments. They leverage OS-level virtualization for efficiency.<span class=\"glossaryai-more-link\"> <a href=\"https:\/\/dockerpros.com\/fr\/wiki\/container\/\">More \u00bb<\/a><\/span><\/span><\/span><\/span><\/span>, use the following command:<\/p>\n<pre><code class=\"language-bash\">docker cp my_nginx:\/var\/log\/nginx\/access.log .\/access.log<\/code><\/pre>\n<p>Cette commande copie le <code>access.log<\/code> file from the container\u2019s log directory to the current directory on your host machine.<\/p>\n<h3>Exemple 3 : Copier un r\u00e9pertoire<\/h3>\n<p>Pour <span class=\"glossaryai-tooltip glossary-term-673\"><span class=\"glossaryai-link\"><a href=\"https:\/\/dockerpros.com\/fr\/wiki\/copy\/\" target=\"_blank\">copie<\/a><\/span><span class=\"gai-content-hidden glossaryai-tooltip-content\"><span class=\"gai-tooltip-body\"><span class=\"glossaryai-tooltip-text\">COPY is a command in computer programming and data management that facilitates the duplication of files or data from one location to another, ensuring data integrity and accessibility.<span class=\"glossaryai-more-link\"> <a href=\"https:\/\/dockerpros.com\/fr\/wiki\/copy\/\">More \u00bb<\/a><\/span><\/span><\/span><\/span><\/span> an entire directory, you can use similar commands. For instance, to <span class=\"glossaryai-tooltip glossary-term-673\"><span class=\"glossaryai-link\"><a href=\"https:\/\/dockerpros.com\/fr\/wiki\/copy\/\" target=\"_blank\">copie<\/a><\/span><span class=\"gai-content-hidden glossaryai-tooltip-content\"><span class=\"gai-tooltip-body\"><span class=\"glossaryai-tooltip-text\">COPY is a command in computer programming and data management that facilitates the duplication of files or data from one location to another, ensuring data integrity and accessibility.<span class=\"glossaryai-more-link\"> <a href=\"https:\/\/dockerpros.com\/fr\/wiki\/copy\/\">More \u00bb<\/a><\/span><\/span><\/span><\/span><\/span> a directory named <code>data<\/code> from the host to a <span class=\"glossaryai-tooltip glossary-term-650\"><span class=\"glossaryai-link\"><a href=\"https:\/\/dockerpros.com\/fr\/wiki\/container\/\" target=\"_blank\">conteneur<\/a><\/span><span class=\"gai-content-hidden glossaryai-tooltip-content\"><span class=\"gai-tooltip-body\"><span class=\"glossaryai-tooltip-text\">Containers are lightweight, portable units that encapsulate software and its dependencies, enabling consistent execution across different environments. They leverage OS-level virtualization for efficiency.<span class=\"glossaryai-more-link\"> <a href=\"https:\/\/dockerpros.com\/fr\/wiki\/container\/\">More \u00bb<\/a><\/span><\/span><\/span><\/span><\/span>:<\/p>\n<pre><code class=\"language-bash\">docker cp .\/data my_nginx:\/usr\/share\/nginx\/html\/data<\/code><\/pre>\n<p>Conversely, if you want to <span class=\"glossaryai-tooltip glossary-term-673\"><span class=\"glossaryai-link\"><a href=\"https:\/\/dockerpros.com\/fr\/wiki\/copy\/\" target=\"_blank\">copie<\/a><\/span><span class=\"gai-content-hidden glossaryai-tooltip-content\"><span class=\"gai-tooltip-body\"><span class=\"glossaryai-tooltip-text\">COPY is a command in computer programming and data management that facilitates the duplication of files or data from one location to another, ensuring data integrity and accessibility.<span class=\"glossaryai-more-link\"> <a href=\"https:\/\/dockerpros.com\/fr\/wiki\/copy\/\">More \u00bb<\/a><\/span><\/span><\/span><\/span><\/span> a directory from the <span class=\"glossaryai-tooltip glossary-term-650\"><span class=\"glossaryai-link\"><a href=\"https:\/\/dockerpros.com\/fr\/wiki\/container\/\" target=\"_blank\">conteneur<\/a><\/span><span class=\"gai-content-hidden glossaryai-tooltip-content\"><span class=\"gai-tooltip-body\"><span class=\"glossaryai-tooltip-text\">Containers are lightweight, portable units that encapsulate software and its dependencies, enabling consistent execution across different environments. They leverage OS-level virtualization for efficiency.<span class=\"glossaryai-more-link\"> <a href=\"https:\/\/dockerpros.com\/fr\/wiki\/container\/\">More \u00bb<\/a><\/span><\/span><\/span><\/span><\/span> \u00e0 l'h\u00f4te :<\/p>\n<pre><code class=\"language-bash\">docker cp my_nginx:\/usr\/share\/nginx\/html\/data .\/data_backup<\/code><\/pre>\n<h3>Example 4: Copying Between Containers<\/h3>\n<p>If you have two containers, <code>app1<\/code> and <code>app2<\/code>, and you need to <span class=\"glossaryai-tooltip glossary-term-673\"><span class=\"glossaryai-link\"><a href=\"https:\/\/dockerpros.com\/fr\/wiki\/copy\/\" target=\"_blank\">copie<\/a><\/span><span class=\"gai-content-hidden glossaryai-tooltip-content\"><span class=\"gai-tooltip-body\"><span class=\"glossaryai-tooltip-text\">COPY is a command in computer programming and data management that facilitates the duplication of files or data from one location to another, ensuring data integrity and accessibility.<span class=\"glossaryai-more-link\"> <a href=\"https:\/\/dockerpros.com\/fr\/wiki\/copy\/\">More \u00bb<\/a><\/span><\/span><\/span><\/span><\/span> a file from <code>app1<\/code> to <code>app2<\/code>, Vous pouvez le faire en deux \u00e9tapes :<\/p>\n<ol>\n<li>\n<p>First, <span class=\"glossaryai-tooltip glossary-term-673\"><span class=\"glossaryai-link\"><a href=\"https:\/\/dockerpros.com\/fr\/wiki\/copy\/\" target=\"_blank\">copie<\/a><\/span><span class=\"gai-content-hidden glossaryai-tooltip-content\"><span class=\"gai-tooltip-body\"><span class=\"glossaryai-tooltip-text\">COPY is a command in computer programming and data management that facilitates the duplication of files or data from one location to another, ensuring data integrity and accessibility.<span class=\"glossaryai-more-link\"> <a href=\"https:\/\/dockerpros.com\/fr\/wiki\/copy\/\">More \u00bb<\/a><\/span><\/span><\/span><\/span><\/span> the file from <code>app1<\/code> \u00e0 l'h\u00f4te :<\/p>\n<pre><code class=\"language-bash\">docker cp app1:\/chemin\/vers\/fichier.txt .\/fichier.txt<\/code><\/pre>\n<\/li>\n<li>\n<p>Then <span class=\"glossaryai-tooltip glossary-term-673\"><span class=\"glossaryai-link\"><a href=\"https:\/\/dockerpros.com\/fr\/wiki\/copy\/\" target=\"_blank\">copie<\/a><\/span><span class=\"gai-content-hidden glossaryai-tooltip-content\"><span class=\"gai-tooltip-body\"><span class=\"glossaryai-tooltip-text\">COPY is a command in computer programming and data management that facilitates the duplication of files or data from one location to another, ensuring data integrity and accessibility.<span class=\"glossaryai-more-link\"> <a href=\"https:\/\/dockerpros.com\/fr\/wiki\/copy\/\">More \u00bb<\/a><\/span><\/span><\/span><\/span><\/span> the file from the host to <code>app2<\/code>:<\/p>\n<pre><code class=\"language-bash\">docker cp .\/file.txt app2:\/path\/to\/<\/code><\/pre>\n<\/li>\n<\/ol>\n<h2>Error Handling and Limitations<\/h2>\n<p>While <code>docker cp<\/code> is a powerful command, it does come with certain limitations and error scenarios that users should be aware of.<\/p>\n<h3>Erreurs courantes<\/h3>\n<ol>\n<li>\n<p><strong>No Such <span class=\"glossaryai-tooltip glossary-term-650\"><span class=\"glossaryai-link\"><a href=\"https:\/\/dockerpros.com\/fr\/wiki\/container\/\" target=\"_blank\">Conteneur<\/a><\/span><span class=\"gai-content-hidden glossaryai-tooltip-content\"><span class=\"gai-tooltip-body\"><span class=\"glossaryai-tooltip-text\">Containers are lightweight, portable units that encapsulate software and its dependencies, enabling consistent execution across different environments. They leverage OS-level virtualization for efficiency.<span class=\"glossaryai-more-link\"> <a href=\"https:\/\/dockerpros.com\/fr\/wiki\/container\/\">More \u00bb<\/a><\/span><\/span><\/span><\/span><\/span><\/strong>: This error occurs when you specify a <span class=\"glossaryai-tooltip glossary-term-650\"><span class=\"glossaryai-link\"><a href=\"https:\/\/dockerpros.com\/fr\/wiki\/container\/\" target=\"_blank\">conteneur<\/a><\/span><span class=\"gai-content-hidden glossaryai-tooltip-content\"><span class=\"gai-tooltip-body\"><span class=\"glossaryai-tooltip-text\">Containers are lightweight, portable units that encapsulate software and its dependencies, enabling consistent execution across different environments. They leverage OS-level virtualization for efficiency.<span class=\"glossaryai-more-link\"> <a href=\"https:\/\/dockerpros.com\/fr\/wiki\/container\/\">More \u00bb<\/a><\/span><\/span><\/span><\/span><\/span> name or ID that does not exist or is not running.<\/p>\n<\/li>\n<li>\n<p><strong>Acc\u00e8s refus\u00e9<\/strong>Cette erreur peut survenir si le chemin de destination ne dispose pas des autorisations appropri\u00e9es ou si l'utilisateur ex\u00e9cutant la commande ne poss\u00e8de pas les droits n\u00e9cessaires.<\/p>\n<\/li>\n<li>\n<p><strong>Directory Not Found<\/strong>: If the specified directory in the destination path does not exist within the <span class=\"glossaryai-tooltip glossary-term-650\"><span class=\"glossaryai-link\"><a href=\"https:\/\/dockerpros.com\/fr\/wiki\/container\/\" target=\"_blank\">conteneur<\/a><\/span><span class=\"gai-content-hidden glossaryai-tooltip-content\"><span class=\"gai-tooltip-body\"><span class=\"glossaryai-tooltip-text\">Containers are lightweight, portable units that encapsulate software and its dependencies, enabling consistent execution across different environments. They leverage OS-level virtualization for efficiency.<span class=\"glossaryai-more-link\"> <a href=\"https:\/\/dockerpros.com\/fr\/wiki\/container\/\">More \u00bb<\/a><\/span><\/span><\/span><\/span><\/span>, you will encounter this error. Always ensure that the target directory is created prior to copying files.<\/p>\n<\/li>\n<\/ol>\n<h3>Limitations<\/h3>\n<ul>\n<li>\n<p><strong>No Symlinks<\/strong>Le <code>docker cp<\/code> La commande ne conserve pas les liens symboliques. Si un lien symbolique est copi\u00e9, il sera remplac\u00e9 par le fichier ou le r\u00e9pertoire r\u00e9el vers lequel il pointe.<\/p>\n<\/li>\n<li>\n<p><strong>Destination Format<\/strong>: The destination path must be an absolute path inside the <span class=\"glossaryai-tooltip glossary-term-650\"><span class=\"glossaryai-link\"><a href=\"https:\/\/dockerpros.com\/fr\/wiki\/container\/\" target=\"_blank\">conteneur<\/a><\/span><span class=\"gai-content-hidden glossaryai-tooltip-content\"><span class=\"gai-tooltip-body\"><span class=\"glossaryai-tooltip-text\">Containers are lightweight, portable units that encapsulate software and its dependencies, enabling consistent execution across different environments. They leverage OS-level virtualization for efficiency.<span class=\"glossaryai-more-link\"> <a href=\"https:\/\/dockerpros.com\/fr\/wiki\/container\/\">More \u00bb<\/a><\/span><\/span><\/span><\/span><\/span>. Relative paths are not supported.<\/p>\n<\/li>\n<li>\n<p><strong>Performance<\/strong>: For large files or directories, consider the implications on performance. The <span class=\"glossaryai-tooltip glossary-term-673\"><span class=\"glossaryai-link\"><a href=\"https:\/\/dockerpros.com\/fr\/wiki\/copy\/\" target=\"_blank\">copie<\/a><\/span><span class=\"gai-content-hidden glossaryai-tooltip-content\"><span class=\"gai-tooltip-body\"><span class=\"glossaryai-tooltip-text\">COPY is a command in computer programming and data management that facilitates the duplication of files or data from one location to another, ensuring data integrity and accessibility.<span class=\"glossaryai-more-link\"> <a href=\"https:\/\/dockerpros.com\/fr\/wiki\/copy\/\">More \u00bb<\/a><\/span><\/span><\/span><\/span><\/span> process may take significant time and resources depending on the size of the data being transferred.<\/p>\n<\/li>\n<\/ul>\n<h2>Meilleures pratiques pour l'utilisation <code>docker cp<\/code><\/h2>\n<p>Pour maximiser l'utilit\u00e9 de <code>docker cp<\/code> tout en minimisant les probl\u00e8mes potentiels, tenez compte des meilleures pratiques suivantes :<\/p>\n<ol>\n<li>\n<p><strong>Use Absolute Paths<\/strong>Toujours sp\u00e9cifier des chemins absolus pour la source et la destination afin d'\u00e9viter toute confusion et erreurs.<\/p>\n<\/li>\n<li>\n<p><strong>Assurer les autorisations<\/strong>: V\u00e9rifiez que vous disposez des autorisations n\u00e9cessaires pour lire et \u00e9crire des fichiers dans les r\u00e9pertoires sp\u00e9cifi\u00e9s afin d'\u00e9viter les erreurs li\u00e9es aux permissions.<\/p>\n<\/li>\n<li>\n<p><strong>Valider les transferts<\/strong>: After copying files, validate the integrity of the transferred data. You can check file sizes, hashes, or even contents to ensure that the <span class=\"glossaryai-tooltip glossary-term-673\"><span class=\"glossaryai-link\"><a href=\"https:\/\/dockerpros.com\/fr\/wiki\/copy\/\" target=\"_blank\">copie<\/a><\/span><span class=\"gai-content-hidden glossaryai-tooltip-content\"><span class=\"gai-tooltip-body\"><span class=\"glossaryai-tooltip-text\">COPY is a command in computer programming and data management that facilitates the duplication of files or data from one location to another, ensuring data integrity and accessibility.<span class=\"glossaryai-more-link\"> <a href=\"https:\/\/dockerpros.com\/fr\/wiki\/copy\/\">More \u00bb<\/a><\/span><\/span><\/span><\/span><\/span> operation was successful.<\/p>\n<\/li>\n<li>\n<p><strong>Backup Important Data<\/strong>Avant de modifier des fichiers critiques dans les conteneurs, sauvegardez toujours les donn\u00e9es existantes. Cela vous permet de restaurer les configurations ou les donn\u00e9es en cas de probl\u00e8me.<\/p>\n<\/li>\n<li>\n<p><strong>Combine with Other Docker Commands<\/strong>: Utilisez <code>docker cp<\/code> in conjunction with other Docker commands such as <code>docker exec<\/code> to gain more control over file management in containers.<\/p>\n<\/li>\n<\/ol>\n<h2>Conclusion<\/h2>\n<p>The <code>docker cp<\/code> command is an essential tool for managing files within Docker containers, bridging the gap between host and <span class=\"glossaryai-tooltip glossary-term-650\"><span class=\"glossaryai-link\"><a href=\"https:\/\/dockerpros.com\/fr\/wiki\/container\/\" target=\"_blank\">conteneur<\/a><\/span><span class=\"gai-content-hidden glossaryai-tooltip-content\"><span class=\"gai-tooltip-body\"><span class=\"glossaryai-tooltip-text\">Containers are lightweight, portable units that encapsulate software and its dependencies, enabling consistent execution across different environments. They leverage OS-level virtualization for efficiency.<span class=\"glossaryai-more-link\"> <a href=\"https:\/\/dockerpros.com\/fr\/wiki\/container\/\">More \u00bb<\/a><\/span><\/span><\/span><\/span><\/span> filesystems. Its ability to <span class=\"glossaryai-tooltip glossary-term-673\"><span class=\"glossaryai-link\"><a href=\"https:\/\/dockerpros.com\/fr\/wiki\/copy\/\" target=\"_blank\">copie<\/a><\/span><span class=\"gai-content-hidden glossaryai-tooltip-content\"><span class=\"gai-tooltip-body\"><span class=\"glossaryai-tooltip-text\">COPY is a command in computer programming and data management that facilitates the duplication of files or data from one location to another, ensuring data integrity and accessibility.<span class=\"glossaryai-more-link\"> <a href=\"https:\/\/dockerpros.com\/fr\/wiki\/copy\/\">More \u00bb<\/a><\/span><\/span><\/span><\/span><\/span> files and directories both ways makes it invaluable for debugging, configuration management, and data migration.<\/p>\n<p>Understanding how to effectively use <code>docker cp<\/code> not only enhances your ability to manage containerized applications but also contributes to a smoother development and operational workflow. By following best practices and being aware of potential limitations and errors, you can harness the full power of Docker\u2019s file management capabilities, ensuring that your applications remain robust and responsive in any environment. <\/p>\n<p>Alors que la conteneurisation continue d'\u00e9voluer et de devenir de plus en plus int\u00e9grale au d\u00e9veloppement d'applications modernes, ma\u00eetriser des commandes comme <code>docker cp<\/code> am\u00e9liorera sans aucun doute votre ensemble de comp\u00e9tences et am\u00e9liorera votre efficacit\u00e9 dans la gestion des environnements conteneuris\u00e9s.<\/p>","protected":false},"excerpt":{"rendered":"<p>Docker <span class=\"glossaryai-tooltip glossary-term-650\"><span class=\"glossaryai-link\"><a href=\"https:\/\/dockerpros.com\/fr\/wiki\/container\/\" target=\"_blank\">Conteneur<\/a><\/span><span class=\"gai-content-hidden glossaryai-tooltip-content\"><span class=\"gai-tooltip-body\"><span class=\"glossaryai-tooltip-text\">Containers are lightweight, portable units that encapsulate software and its dependencies, enabling consistent execution across different environments. They leverage OS-level virtualization for efficiency.<span class=\"glossaryai-more-link\"> <a href=\"https:\/\/dockerpros.com\/fr\/wiki\/container\/\">More \u00bb<\/a><\/span><\/span><\/span><\/span><\/span> CP est une commande utilis\u00e9e pour <span class=\"glossaryai-tooltip glossary-term-673\"><span class=\"glossaryai-link\"><a href=\"https:\/\/dockerpros.com\/fr\/wiki\/copy\/\" target=\"_blank\">copie<\/a><\/span><span class=\"gai-content-hidden glossaryai-tooltip-content\"><span class=\"gai-tooltip-body\"><span class=\"glossaryai-tooltip-text\">COPY is a command in computer programming and data management that facilitates the duplication of files or data from one location to another, ensuring data integrity and accessibility.<span class=\"glossaryai-more-link\"> <a href=\"https:\/\/dockerpros.com\/fr\/wiki\/copy\/\">More \u00bb<\/a><\/span><\/span><\/span><\/span><\/span> files and directories between Docker containers and the host filesystem. It simplifies data management and enhances workflow efficiency in containerized environments.<\/p>","protected":false},"author":1,"featured_media":1755,"parent":0,"template":"","glossary-cat":[],"class_list":["post-1219","glossary","type-glossary","status-publish","has-post-thumbnail","hentry"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.0 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>Docker Container CP - Dockerpros<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/dockerpros.com\/fr\/wiki\/docker-container-cp\/\" \/>\n<meta property=\"og:locale\" content=\"fr_FR\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Docker Container CP - Dockerpros\" \/>\n<meta property=\"og:description\" content=\"Docker Container CP is a command used to copy files and directories between Docker containers and the host filesystem. It simplifies data management and enhances workflow efficiency in containerized environments.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/dockerpros.com\/fr\/wiki\/docker-container-cp\/\" \/>\n<meta property=\"og:site_name\" content=\"Dockerpros\" \/>\n<meta property=\"article:modified_time\" content=\"2024-07-22T20:51:38+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/dockerpros.com\/wp-content\/uploads\/2024\/07\/docker-container-cp_1219.jpg\" \/>\n\t<meta property=\"og:image:width\" content=\"800\" \/>\n\t<meta property=\"og:image:height\" content=\"600\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/jpeg\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Dur\u00e9e de lecture estim\u00e9e\" \/>\n\t<meta name=\"twitter:data1\" content=\"6 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\/\/dockerpros.com\/wiki\/docker-container-cp\/\",\"url\":\"https:\/\/dockerpros.com\/wiki\/docker-container-cp\/\",\"name\":\"Docker Container CP - Dockerpros\",\"isPartOf\":{\"@id\":\"https:\/\/dockerpros.com\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\/\/dockerpros.com\/wiki\/docker-container-cp\/#primaryimage\"},\"image\":{\"@id\":\"https:\/\/dockerpros.com\/wiki\/docker-container-cp\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/dockerpros.com\/wp-content\/uploads\/2024\/07\/docker-container-cp_1219.jpg\",\"datePublished\":\"2024-07-22T20:46:25+00:00\",\"dateModified\":\"2024-07-22T20:51:38+00:00\",\"breadcrumb\":{\"@id\":\"https:\/\/dockerpros.com\/wiki\/docker-container-cp\/#breadcrumb\"},\"inLanguage\":\"fr-FR\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/dockerpros.com\/wiki\/docker-container-cp\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"fr-FR\",\"@id\":\"https:\/\/dockerpros.com\/wiki\/docker-container-cp\/#primaryimage\",\"url\":\"https:\/\/dockerpros.com\/wp-content\/uploads\/2024\/07\/docker-container-cp_1219.jpg\",\"contentUrl\":\"https:\/\/dockerpros.com\/wp-content\/uploads\/2024\/07\/docker-container-cp_1219.jpg\",\"width\":800,\"height\":600,\"caption\":\"docker-container-cp-2\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/dockerpros.com\/wiki\/docker-container-cp\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/dockerpros.com\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Glossary\",\"item\":\"https:\/\/dockerpros.com\/fr\/wiki\/\"},{\"@type\":\"ListItem\",\"position\":3,\"name\":\"Docker Container CP\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/dockerpros.com\/#website\",\"url\":\"https:\/\/dockerpros.com\/\",\"name\":\"Dockerpros\",\"description\":\"DockerPros \u2013 Your Ultimate Docker Resource Hub\",\"publisher\":{\"@id\":\"https:\/\/dockerpros.com\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/dockerpros.com\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"fr-FR\"},{\"@type\":\"Organization\",\"@id\":\"https:\/\/dockerpros.com\/#organization\",\"name\":\"Dockerpros\",\"url\":\"https:\/\/dockerpros.com\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"fr-FR\",\"@id\":\"https:\/\/dockerpros.com\/#\/schema\/logo\/image\/\",\"url\":\"https:\/\/dockerpros.com\/wp-content\/uploads\/2024\/07\/Dockerpros_logo_blanco.png\",\"contentUrl\":\"https:\/\/dockerpros.com\/wp-content\/uploads\/2024\/07\/Dockerpros_logo_blanco.png\",\"width\":532,\"height\":114,\"caption\":\"Dockerpros\"},\"image\":{\"@id\":\"https:\/\/dockerpros.com\/#\/schema\/logo\/image\/\"}}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Conteneur Docker CP - Dockerpros","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/dockerpros.com\/fr\/wiki\/docker-container-cp\/","og_locale":"fr_FR","og_type":"article","og_title":"Docker Container CP - Dockerpros","og_description":"Docker Container CP is a command used to copy files and directories between Docker containers and the host filesystem. It simplifies data management and enhances workflow efficiency in containerized environments.","og_url":"https:\/\/dockerpros.com\/fr\/wiki\/docker-container-cp\/","og_site_name":"Dockerpros","article_modified_time":"2024-07-22T20:51:38+00:00","og_image":[{"width":800,"height":600,"url":"https:\/\/dockerpros.com\/wp-content\/uploads\/2024\/07\/docker-container-cp_1219.jpg","type":"image\/jpeg"}],"twitter_card":"summary_large_image","twitter_misc":{"Dur\u00e9e de lecture estim\u00e9e":"6 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/dockerpros.com\/wiki\/docker-container-cp\/","url":"https:\/\/dockerpros.com\/wiki\/docker-container-cp\/","name":"Conteneur Docker CP - Dockerpros","isPartOf":{"@id":"https:\/\/dockerpros.com\/#website"},"primaryImageOfPage":{"@id":"https:\/\/dockerpros.com\/wiki\/docker-container-cp\/#primaryimage"},"image":{"@id":"https:\/\/dockerpros.com\/wiki\/docker-container-cp\/#primaryimage"},"thumbnailUrl":"https:\/\/dockerpros.com\/wp-content\/uploads\/2024\/07\/docker-container-cp_1219.jpg","datePublished":"2024-07-22T20:46:25+00:00","dateModified":"2024-07-22T20:51:38+00:00","breadcrumb":{"@id":"https:\/\/dockerpros.com\/wiki\/docker-container-cp\/#breadcrumb"},"inLanguage":"fr-FR","potentialAction":[{"@type":"ReadAction","target":["https:\/\/dockerpros.com\/wiki\/docker-container-cp\/"]}]},{"@type":"ImageObject","inLanguage":"fr-FR","@id":"https:\/\/dockerpros.com\/wiki\/docker-container-cp\/#primaryimage","url":"https:\/\/dockerpros.com\/wp-content\/uploads\/2024\/07\/docker-container-cp_1219.jpg","contentUrl":"https:\/\/dockerpros.com\/wp-content\/uploads\/2024\/07\/docker-container-cp_1219.jpg","width":800,"height":600,"caption":"docker-container-cp-2"},{"@type":"BreadcrumbList","@id":"https:\/\/dockerpros.com\/wiki\/docker-container-cp\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/dockerpros.com\/"},{"@type":"ListItem","position":2,"name":"Glossary","item":"https:\/\/dockerpros.com\/fr\/wiki\/"},{"@type":"ListItem","position":3,"name":"Docker Container CP"}]},{"@type":"WebSite","@id":"https:\/\/dockerpros.com\/#website","url":"https:\/\/dockerpros.com\/","name":"Dockerpros","description":"DockerPros \u2013 Votre centre de ressources Docker incontournable","publisher":{"@id":"https:\/\/dockerpros.com\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/dockerpros.com\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"fr-FR"},{"@type":"Organization","@id":"https:\/\/dockerpros.com\/#organization","name":"Dockerpros","url":"https:\/\/dockerpros.com\/","logo":{"@type":"ImageObject","inLanguage":"fr-FR","@id":"https:\/\/dockerpros.com\/#\/schema\/logo\/image\/","url":"https:\/\/dockerpros.com\/wp-content\/uploads\/2024\/07\/Dockerpros_logo_blanco.png","contentUrl":"https:\/\/dockerpros.com\/wp-content\/uploads\/2024\/07\/Dockerpros_logo_blanco.png","width":532,"height":114,"caption":"Dockerpros"},"image":{"@id":"https:\/\/dockerpros.com\/#\/schema\/logo\/image\/"}}]}},"_links":{"self":[{"href":"https:\/\/dockerpros.com\/fr\/wp-json\/wp\/v2\/glossary\/1219","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/dockerpros.com\/fr\/wp-json\/wp\/v2\/glossary"}],"about":[{"href":"https:\/\/dockerpros.com\/fr\/wp-json\/wp\/v2\/types\/glossary"}],"author":[{"embeddable":true,"href":"https:\/\/dockerpros.com\/fr\/wp-json\/wp\/v2\/users\/1"}],"version-history":[{"count":0,"href":"https:\/\/dockerpros.com\/fr\/wp-json\/wp\/v2\/glossary\/1219\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/dockerpros.com\/fr\/wp-json\/wp\/v2\/media\/1755"}],"wp:attachment":[{"href":"https:\/\/dockerpros.com\/fr\/wp-json\/wp\/v2\/media?parent=1219"}],"wp:term":[{"taxonomy":"glossary-cat","embeddable":true,"href":"https:\/\/dockerpros.com\/fr\/wp-json\/wp\/v2\/glossary-cat?post=1219"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}