Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save tobiaswx/c25de3ba0ec1282ff5b7379309a81b7c to your computer and use it in GitHub Desktop.
Save tobiaswx/c25de3ba0ec1282ff5b7379309a81b7c to your computer and use it in GitHub Desktop.

Revisions

  1. @giansalex giansalex created this gist Apr 14, 2020.
    17 changes: 17 additions & 0 deletions docker-volume-directory.md
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,17 @@
    # Create docker volume
    Create new docker volume in specific path.

    #### Create Directory to save `volume` data
    ```
    mkdir -p /mnt/xxxx/volume/data
    ```

    #### Create volume with above path
    ```
    docker volume create newvolumen_data -o type=none -o device=/mnt/xxxx/volume/data -o o=bind
    ```

    Check volume
    ```
    docker volume inspect newvolumen_data
    ```