Answers: <p>You can use Docker volume mounts at run time.  For example:</p>
  
  <pre><code>$ mkdir -p app/src logs
  $ touch app/src/foo.c logs/bar.txt
  $ docker run --rm -v $PWD/app:/app -v $PWD/logs:/app/logs alpine ls -l /app /app/src /app/logs
  /app:
  total 8
  drwxr-xr-x    2 1000     1000          4096 May  6 23:33 logs
  drwxr-xr-x    2 1000     1000          4096 May  6 23:33 src
  
  /app/logs:
  total 0
  -rw-r--r--    1 1000     1000             0 May  6 23:33 bar.txt
  
  /app/src:
  total 0
  -rw-r--r--    1 1000     1000             0 May  6 23:33 foo.c
  </code></pre>
  
  <p>This mounts two directories on the host into the docker container.  Notice in this example that inside the container, they are mount on inside the other.</p>
  
Answers: CC BY-SA 4.0
Answers: 2020-05-06T23:40:46.027Z
Answers: 2020-05-06T23:40:46.027Z
Answers: Arcege
Body: <p>My datasets and codes are in different folders and they don't have immediate parent folder.
   I want my codes to access my datasets while using docker run. Is there a way to load both codes and datasets folder into workspace?</p>
  
Tags: <docker>
Title: How can I load multiple paths into the workspace during docker run?
UserDisplayName: tonygrey
ThreadText: # How can I load multiple paths into the workspace during docker run?
  
  (Asked by: username_0 on 2020-05-06)
  
  My datasets and codes are in different folders and they don't have immediate parent folder.
  I want my codes to access my datasets while using docker run. Is there a way to load both codes and datasets folder into workspace?
  
  **Tags:** docker
  
  
  ---
  
  ## 1 answers
  
  ### Answer by username_1 on 2020-05-06. Score: 3
  
  You can use Docker volume mounts at run time. For example:
  
  ```
  $ mkdir -p app/src logs
  $ touch app/src/foo.c logs/bar.txt
  $ docker run --rm -v $PWD/app:/app -v $PWD/logs:/app/logs alpine ls -l /app /app/src /app/logs
  /app:
  total 8
  drwxr-xr-x    2 1000     1000          4096 May  6 23:33 logs
  drwxr-xr-x    2 1000     1000          4096 May  6 23:33 src
  
  /app/logs:
  total 0
  -rw-r--r--    1 1000     1000             0 May  6 23:33 bar.txt
  
  /app/src:
  total 0
  -rw-r--r--    1 1000     1000             0 May  6 23:33 foo.c
  
  ```
  
  This mounts two directories on the host into the docker container. Notice in this example that inside the container, they are mount on inside the other.
  
  
  ---
  
  