Docker: Difference between revisions

From Chorke Wiki
Jump to navigation Jump to search
No edit summary
No edit summary
Line 17: Line 17:
winpty docker pull hello-world
winpty docker pull hello-world
winpty docker run -it --rm --name hello hello-world:latest
winpty docker run -it --rm --name hello hello-world:latest
</source>
==Knowledge==
<source lang="bash">
docker network ls
docker network prune
docker network rm msc_docker_br_00 msc_docker_br_01
docker run -itd --network=msc_docker_br_00 nexus
docker network connect --alias db --alias mysql msc_docker_br_00 mysql
docker network create --subnet 10.20.13.0/28 --ip-range 172.20.240.0/20 multi-host-network
</source>
</source>


Line 48: Line 59:
* [https://stackoverflow.com/questions/63572071 Docker published ports are not reachable]
* [https://stackoverflow.com/questions/63572071 Docker published ports are not reachable]
* [https://docs.docker.com/engine/reference/builder/ Dockerfile Reference]
* [https://docs.docker.com/engine/reference/builder/ Dockerfile Reference]
* [https://www.calculator.net/ip-subnet-calculator.html?cclass=any&csubnet=28&cip=10.19.83.1&ctype=ipv4&printit=0&x=81&y=28 <code>10.19.83.0/28</code>]
* [https://www.calculator.net/ip-subnet-calculator.html?cclass=any&csubnet=28&cip=10.20.13.1&ctype=ipv4&printit=0&x=81&y=15 <code>10.20.13.0/28</code>]
* [https://docs.docker.com/engine/reference/commandline/network/ Docker Network]
* [https://docs.docker.com/engine/reference/commandline/network/ Docker Network]


|}
|}

Revision as of 17:11, 26 August 2020

Windows 10 Home

# powershell
dism.exe /online /enable-feature /featurename:Microsoft-Windows-Subsystem-Linux /all /norestart
dism.exe /online /enable-feature /featurename:VirtualMachinePlatform /all /norestart
wsl --set-default-version 2
# powershell
docker pull hello-world
docker run -it --rm --name hello hello-world:latest
# gitbash
winpty docker pull hello-world
winpty docker run -it --rm --name hello hello-world:latest

Knowledge

docker network ls
docker network prune
docker network rm msc_docker_br_00 msc_docker_br_01

docker run -itd --network=msc_docker_br_00 nexus
docker network connect --alias db --alias mysql msc_docker_br_00 mysql
docker network create --subnet 10.20.13.0/28 --ip-range 172.20.240.0/20 multi-host-network

Reference