Docker Volume name with slash's (/) unable to be removed

Viewed 171

In short, I wasn't paying attention to what I was doing and created a Docker volume named /etc/[folder name], using the local-persist storage driver (Note: I was not trying to create a volume in /etc on the host, long story, but it was just a typo). Obviously this was not intentional, so in going to remove it, I get the message: Error: No such volume: /etc/[folder name].

Output of docker volume ls:

carsons5@host:~$ docker volume ls
DRIVER          VOLUME NAME
local-persist   /etc/[folder name]
local-persist   ...
local-persist   ...
local-persist   ...
local-persist   ...
local           ...

The commands and troubleshooting steps I took are as follows:

  • Remove with quotes (docker volume rm "/etc/[folder name]")
  • Remove with escape sequences (docker volume rm \/etc\/[folder name])
  • Remove with prune (docker volume prune/docker volume prune --force)
  • Create a container using the volume (did not work: Error: No such volume: /etc/[folder name])

At this point, I feel like I am about out of options and was wondering if anyone else had experienced this. Additionally, is there still any point/benefit to using the local-persist driver? I have been using it for years, but troubleshooting this problem made me realize there may be an alternative built in to Docker itself.

Other details:

Host OS: Ubuntu 20.04.3 Server
Docker Version: 20.10.8
0 Answers
Related