October 2018
Beginner
232 pages
7h 52m
English
Using the args option allows you to pass in arguments to the docker run command. This is similar to the additional args option that's used in the build_image section. This can be useful if you require something more granular than the general command.
An example within the provision block of your Vagrantfile would be as follows:
dock.run "ubuntu", args: "--name ubuntumain"
In the preceding example, we are referencing the run command and the args option. The args option will pass in the parameter to the docker run command when necessary. In our example, it is passing the --name flag with a value of ubuntumain. This will be the name of the container.
Read now
Unlock full access