Difference between revisions of "Docker"

From Hawk Wiki
Jump to: navigation, search
(Created page with "==Docker socks5 proxy and Auto Restart== run on port 21080 <pre> docker pull wernight/dante docker run -dit --restart unless-stopped -p 21080:1080 wernight/dante </pre>")
 
(Docker socks5 proxy and Auto Restart)
Line 4: Line 4:
 
docker pull wernight/dante
 
docker pull wernight/dante
 
docker run -dit --restart unless-stopped -p 21080:1080 wernight/dante
 
docker run -dit --restart unless-stopped -p 21080:1080 wernight/dante
 +
</pre>
 +
==Docker mongodb==
 +
<pre>
 +
docker run -d -p 29017:27017 -v /data/db:/data/db -v /etc/mongod.conf:/etc/mongod.conf mongo:3.6.9-stretch --directoryperdb
 +
</pre>
 +
==Docker remove all stopped containers==
 +
<pre>
 +
docker container rm $(docker container ls -q)
 
</pre>
 
</pre>

Revision as of 01:22, 24 December 2018

Docker socks5 proxy and Auto Restart

run on port 21080

docker pull wernight/dante
docker run -dit --restart unless-stopped -p 21080:1080 wernight/dante

Docker mongodb

docker run -d -p 29017:27017 -v /data/db:/data/db -v /etc/mongod.conf:/etc/mongod.conf mongo:3.6.9-stretch --directoryperdb

Docker remove all stopped containers

docker container rm $(docker container ls -q)