Problem
I have created the todo-list volume and both containers when using image diamol/ch06-todo-list access the right volume. but when executing
docker container run -d -p 8011:80 -v todo-list:$target --name todo-v2 diamol/ch06-todo-list:v2
it does not get attached to the todo-list volume, it creates another volume. Here is the output of when I inspect the todo-v2
❯ docker volume ls
DRIVER VOLUME NAME
local 1de16473d716d108116f0f9f5b89ac49b0e04f0321b39705b513cac388692173
local 2b4ec261ca96b2c18e5f9ecd4f38793194e54b29c05b67e8329b47dcdc31734a
local 51c51f8497ebed99284a3e7ef18bf831bb44716b1c1e688bc55f88a69675b98b
local 431df4f0ae54200a7c47e77c654537fc9388b368d110261fcaf38ac604141d5a
local todo-list
The volume "21ca45c272c6041731b9906207b7ef158e0fcd13b3ec541d88de07c68891aa35" attached to the v2 even does not appear in the listing
Docker version
Client: Docker Engine - Community
Cloud integration: 1.0.9
Version: 20.10.5
API version: 1.41
Go version: go1.13.15
Git commit: 55c4c88
Built: Tue Mar 2 20:14:53 2021
OS/Arch: windows/amd64
Context: default
Experimental: true
Server: Docker Engine - Community
Engine:
Version: 20.10.5
API version: 1.41 (minimum version 1.24)
Go version: go1.13.15
Git commit: 363e9a8
Built: Tue Mar 2 20:26:56 2021
OS/Arch: windows/amd64
Experimental: false
Code version
Please run git log -n 1 and paste the output.
❯ git log -n 1
commit a88e5b8d6bfd1180d5990b1d4d956d18c9266c4c (HEAD -> master)
Author: Elton Stoneman elton@sixeyed.com
Date: Wed Apr 15 21:59:52 2020 +0100
Exercise Ch06 - Using Docker volumes Page 84
Problem I have created the todo-list volume and both containers when using image diamol/ch06-todo-list access the right volume. but when executing
docker container run -d -p 8011:80 -v todo-list:$target --name todo-v2 diamol/ch06-todo-list:v2
it does not get attached to the todo-list volume, it creates another volume. Here is the output of when I inspect the todo-v2❯ docker inspect --format='{{json .GraphDriver}}' todo-v2 {"Data":{"dir":"H:\dockerStorage\windowsfilter\21ca45c272c6041731b9906207b7ef158e0fcd13b3ec541d88de07c68891aa35"},"Name":"windowsfilter"}
and here is the output of volume ls
The volume "21ca45c272c6041731b9906207b7ef158e0fcd13b3ec541d88de07c68891aa35" attached to the v2 even does not appear in the listing
Docker version Client: Docker Engine - Community Cloud integration: 1.0.9 Version: 20.10.5 API version: 1.41 Go version: go1.13.15 Git commit: 55c4c88 Built: Tue Mar 2 20:14:53 2021 OS/Arch: windows/amd64 Context: default Experimental: true
Server: Docker Engine - Community Engine: Version: 20.10.5 API version: 1.41 (minimum version 1.24) Go version: go1.13.15 Git commit: 363e9a8 Built: Tue Mar 2 20:26:56 2021 OS/Arch: windows/amd64 Experimental: false
Code version Please run
git log -n 1
and paste the output. ❯ git log -n 1 commit a88e5b8d6bfd1180d5990b1d4d956d18c9266c4c (HEAD -> master) Author: Elton Stoneman elton@sixeyed.com Date: Wed Apr 15 21:59:52 2020 +0100Additional context