Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Docker userful commands
50 ls
2051 chmod 777 -R Dockerfile
2052 rm Dockerfile~
2053 rm server.py~
2054 ls
2055 docker build flask_app .
2056 docker build .
2057 docker
2058 docker build --h
2059 docker build --help
2060 docker build .
2061 docker build -t flask_app .
2062 sudo docker build -t flask_app .
2063 gedit Dockerfile
2064 sudo docker build -t flask_app .
2065 ls
2066 sudo docker build -t flask_app .
2067 gedit Dockerfile
2068 mv requirement.txt requirements.txt
2069 sudo docker build -t flask_app .
2070 gedit Dockerfile
2071 sudo docker build -t flask_app .
2072 sudo docker images
2073 sudo docker run -p 5000:500 flask_app
2074 gedit server.py
2075 sudo docker build -t flask_app .
2076 sudo docker run -p 5000:5000 flask_app
2077 sudo docker ps
2078 sudo docker run -it -p 5000:5000 flask_app
2079 sudo docker ps
2080 sudo docker run -it -p 5000:5000 flask_app
2081 gedit server.py
2082 sudo docker build -t flask_app .
2083 sudo docker run -it -p 5000:5000 flask_app
2084 docker ps
2085 sudo docker ps
2086 sudo su
2087 sudo docker run -it -p 5000:5000 flask_app
2088 sudo docker run -p 5000:5000 flask_app
2089 sudo docker run -d -p 5000:5000 flask_app
2090 sudo docker ps
2091 sudo docker inspect c9b4404d2acb
2092 sudo docker -f '{{ .NetworkSettings.IPAddress }}' c9b4404d2acb
2093 sudo docker inspect -f '{{ .NetworkSettings.IPAddress }}' c9b4404d2acb
2094 netstat -tulp | grep 5000
2095 netstat -tulpn | grep 5000
2096 gedit server.py
2097 sudo docker rm c9b4404d2acb
2098 sudo dockerstop c9b4404d2acb
2099 sudo docker stop c9b4404d2acb
2100 sudo docker rm c9b4404d2acb
2101 sudo docker ps
2102 sudo docker build -t flask_app .
2103 sudo docker run -d -p 5000:5000 flask_app
2104 sudo docker ps
2105 sudo docker inspect -f '{{ .NetworkSettings.IPAddress }}' e9ebcd6adf97
2106 history
hassenfath@hassenfath:~/work/training/docker/compose/flask_app$ history --tail 50
-bash: history: --: invalid option
history: usage: history [-c] [-d offset] [n] or history -anrw [filename] or history -ps arg [arg...]
hassenfath@hassenfath:~/work/training/docker/compose/flask_app$ history | --tail 50
--tail: command not found
hassenfath@hassenfath:~/work/training/docker/compose/flask_app$ history | tail 50
tail: cannot open ‘50’ for reading: No such file or directory
hassenfath@hassenfath:~/work/training/docker/compose/flask_app$ history | tail -50
2061 docker build -t flask_app .
2062 sudo docker build -t flask_app .
2063 gedit Dockerfile
2064 sudo docker build -t flask_app .
2065 ls
2066 sudo docker build -t flask_app .
2067 gedit Dockerfile
2068 mv requirement.txt requirements.txt
2069 sudo docker build -t flask_app .
2070 gedit Dockerfile
2071 sudo docker build -t flask_app .
2072 sudo docker images
2073 sudo docker run -p 5000:500 flask_app
2074 gedit server.py
2075 sudo docker build -t flask_app .
2076 sudo docker run -p 5000:5000 flask_app
2077 sudo docker ps
2078 sudo docker run -it -p 5000:5000 flask_app
2079 sudo docker ps
2080 sudo docker run -it -p 5000:5000 flask_app
2081 gedit server.py
2082 sudo docker build -t flask_app .
2083 sudo docker run -it -p 5000:5000 flask_app
2084 docker ps
2085 sudo docker ps
2086 sudo su
2087 sudo docker run -it -p 5000:5000 flask_app
2088 sudo docker run -p 5000:5000 flask_app
2089 sudo docker run -d -p 5000:5000 flask_app
2090 sudo docker ps
2091 sudo docker inspect c9b4404d2acb
2092 sudo docker -f '{{ .NetworkSettings.IPAddress }}' c9b4404d2acb
2093 sudo docker inspect -f '{{ .NetworkSettings.IPAddress }}' c9b4404d2acb
2094 netstat -tulp | grep 5000
2095 netstat -tulpn | grep 5000
2096 gedit server.py
2097 sudo docker rm c9b4404d2acb
2098 sudo dockerstop c9b4404d2acb
2099 sudo docker stop c9b4404d2acb
2100 sudo docker rm c9b4404d2acb
2101 sudo docker ps
2102 sudo docker build -t flask_app .
2103 sudo docker run -d -p 5000:5000 flask_app
2104 sudo docker ps
2105 sudo docker inspect -f '{{ .NetworkSettings.IPAddress }}' e9ebcd6adf97
2106 history
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.