hashicorp / hashicorp/nomad

Allow for anonymous volumes with Docker driver

Open
#11,318 2 comments 0 reactions 0 assignees View on GitHub
stage/accepted theme/driver/docker type/enhancement
Dominant language
Go
Stars
17k
Forks
2.1k
Avg merge
1d 9h
Merged PRs (30d)
105

Description

### Proposal
I would like to propose that Nomad's Docker driver allow support for anonymous volumes when creating a Docker container.

### Use-cases
I have a use case where I'm trying to run a Docker container that needs an anonymous volume mount. When I try configuring it like so:
![Screen Shot 2021-10-14 at 2 06 52 PM](https://user-images.githubusercontent.com/11050179/137380646-9400e4da-60bf-4a7a-ba76-8f9f2258a10e.png)
I get the following error when Nomad tries to start the job:
![Screen Shot 2021-10-14 at 2 06 25 PM](https://user-images.githubusercontent.com/11050179/137380705-5bacc09b-75c3-4335-bf5f-a49a6d1960e2.png)

### Additional notes
Running say "docker run -v /scratch/docker ..." is a perfectly valid Docker command. So I would expect it to work here also.
I would expect the volume mount constraints to match what they are for Docker when using the Driver.

Contributor guide

No contributing guide indexed for this repository

Research direction

Start at Nomad's Docker driver volume configuration and trace how a mount such as /scratch/docker is validated before container creation. Compare that behavior with the documented docker run -v /scratch/docker case; done means the driver accepts and creates the requested anonymous volume mount without the reported startup error.

Written by the indexing model from the issue text.

Assessment

Tech stack
docker, go
Domain
devops, infrastructure
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.