Search
 
SCRIPT & CODE EXAMPLE
 

SHELL

get docker id from name

In Linux:

$ sudo docker ps -aqf "name=containername"

Or in OS X, Windows:

$ docker ps -aqf "name=containername"


where containername is your container name.
To avoid getting false positives, you can use regex anchors like so:
docker ps -aqf "name=^containername$"

explanation:
    -q for quiet. output only the ID
    -a for all. works even if your container is not running
    -f for filter.
    ^ container name must start with this string
    $ container name must end with this string

Comment

PREVIOUS NEXT
Code Example
Shell :: remove systemd service 
Shell :: find out which procses is using port linux 
Shell :: install docker-compose ubuntu 
Shell :: ubuntu install jre 
Shell :: docker-compose clear cache 
Shell :: how to pull submodules git 
Shell :: import org.apache.cordova.Whitelist; 
Shell :: list drives unbuntu server 
Shell :: capacitor resources 
Shell :: ubuntu root login ssh 
Shell :: bash parameter count 
Shell :: sql like bracket 
Shell :: ssh remove whole folder command 
Shell :: how to remove the last character terminal 
Shell :: apt-get update 
Shell :: brew install vlc 
Shell :: Docker run image in port 8080 
Shell :: gnome disk utility ubuntu 
Shell :: how to install vlc in fedora 
Shell :: apache2 reload 
Shell :: vim tab 2 spaces 
Shell :: kubectl pod stuck terminating 
Shell :: debian install vim 
Shell :: install sudo 
Shell :: install opera ubuntu terminal command 
Shell :: install keras anaconda jupyter notebook 
Shell :: ubuntu check php status 
Shell :: download nbextensions 
Shell :: powershell get all environment variables 
Shell :: shell script current time 
ADD CONTENT
Topic
Content
Source link
Name
9+7 =