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.
Docker volume in specify path (Linux)

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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment