$ docker run -d -P nginxĩ9b9505c7c18e51b1154e7d95f0e034eac4c9264ff2196501208ffd35644c37cĬommands like docker inspect or docker kill take an ID or name as an input, so if you're new to Docker you would probably copy/paste the whole container ID. Here I run an nginx container and then forget to give it a name. Having done this myself I saw docker top - something brand new for me.ĭisplay the running processes of a container Now you can profit from doing things like this:Īttach events info network rename service unpauseīuild exec inspect node restart start updateĬommit export kill pause rm stats version Ln -s /Applications/Docker.app/Contents/Resources/etc/docker-compose.bash-completion Ln -s /Applications/Docker.app/Contents/Resources/etc/docker-machine.bash-completion Ln -s /Applications/Docker.app/Contents/Resources/etc/docker.bash-completion bashrc file already then you may want to use chmod +x and to add an extra line at the top of the file #!/bin/bash cat > ~/.bashrc <<EOL bashrc file that is executed every time you open a terminal. We will run through the instructions here and show a couple of examples of what it looks like when configured. This little nugget was hidden away there. I learned this information by reading all the way to the bottom of the new Docker for Mac getting started page. Now if you're running the Docker Mac beta and you have brew installed too, then it only takes a few moments. You also have bash completion for when you're not sure what commands are available.ĭo I have bzip? What was it called again? $ bz I use this for laziness, so I get to type less and make fewer mistakes. If you are using a terminal every day then you probably hit tab after every few characters. Here's the kicker - it works for Docker too after running a few quick scripts. Bash completion is a kind of plug-in for your terminal that lets you auto-complete or auto-suggest what to type in next by hitting tab. I don't know how I've managed without this for so long.
0 Comments
Leave a Reply. |