How can I rename a docker-machine
machine? I can't find it using docker-machine --help
or in the subcommand docs.
To rename docker container, use the rename sub-command as shown, in the following example, we renaming the container discourse_app to a new name disc_app. After renaming a containers, confirm that it is now using the new name.
You can rename your docker image by docker tag command.
Basically you have to:
/.docker/machine/machines/
)config.json
with the new name and new pathHere is a gist for VirtualBox. With this you can rename machines like this docker-machine-rename default my-default
This will only work if you are using VirtualBox. If you are using paralells driver or something else you have to replace vboxmanage ...
with the appropriate command for that driver
EDITED I updated the script after receiving feedback from @DagHøidahl
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With