-
Notifications
You must be signed in to change notification settings - Fork 18.9k
Closed
Labels
area/cliClientClientkind/featureFunctionality or other elements that the project doesn't currently have. Features are new and shinyFunctionality or other elements that the project doesn't currently have. Features are new and shiny
Description
Docker needs a way of specifying options to "docker run" in a file.
You shouldn't have to write all this:
docker run -i -t --volumes-from=shykes-dev -v /var/run/docker.sock:/var/run/docker.sock -u 0 --name project -h project shykes/devbox bash
Instead, this could be in a file called .docker/config:
[run]
interactive=true
tty=true
volumes-from=shykes-dev
volume=/var/run/docker.sock:/var/run/docker.sock
user=0
name=project
host=project
image=shykes/devbox
cmd=bash
Then you can just run docker run in the same directory as that file.
This is a bit like how .git/config works, where you can, for example, specify options under a [log] section that overrides options on git log.
You could also specify what file to use with the --config option, like so:
docker --config=/etc/docker/config run
If you want to disable the config and specify options manually, there could be a --no-config option.
Environment variables could be specified by using the env-file option.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
area/cliClientClientkind/featureFunctionality or other elements that the project doesn't currently have. Features are new and shinyFunctionality or other elements that the project doesn't currently have. Features are new and shiny