Handling Docker at console: Unterschied zwischen den Versionen
Zur Navigation springen
Zur Suche springen
| Zeile 1: | Zeile 1: | ||
=Docker run an image= | =Docker run an image= | ||
*docker run -d -p 8480:80 -p 8443:443 -v /data/docker/apache_html:/var/www/html -v /data/docker/apache_etc:/etc/apache2 --name co-apache im-apache-03 | *docker run -d -p 8480:80 -p 8443:443 -v /data/docker/apache_html:/var/www/html -v /data/docker/apache_etc:/etc/apache2 --name co-apache im-apache-03 | ||
| − | |||
| − | |||
{| class="wikitable" | {| class="wikitable" | ||
|+Options | |+Options | ||
| Zeile 15: | Zeile 13: | ||
|host port 8443 to container port 443 | |host port 8443 to container port 443 | ||
|- | |- | ||
| − | | | + | | -v /data/docker/apache_html:/var/www/html |
| − | | | + | |mount /data/docker/apache_html on host to var/www/html in the container |
| + | |- | ||
| + | | -v /data/docker/apache_etc:/etc/apache2 | ||
| + | |mount /data/docker/apache_etc on host /etc/apache2 in the container | ||
| + | |- | ||
| + | | --name co-apache | ||
| + | |name of the container | ||
|- | |- | ||
| − | | | + | |im-apache-03 |
| − | | | + | |name of the image |
|} | |} | ||
==Demonmode== | ==Demonmode== | ||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
Version vom 8. Oktober 2019, 13:44 Uhr
Docker run an image
- docker run -d -p 8480:80 -p 8443:443 -v /data/docker/apache_html:/var/www/html -v /data/docker/apache_etc:/etc/apache2 --name co-apache im-apache-03
| -d | demon mode |
| -p 8480:80 | host port 8480 to container port 80 |
| -p 8443:443 | host port 8443 to container port 443 |
| -v /data/docker/apache_html:/var/www/html | mount /data/docker/apache_html on host to var/www/html in the container |
| -v /data/docker/apache_etc:/etc/apache2 | mount /data/docker/apache_etc on host /etc/apache2 in the container |
| --name co-apache | name of the container |
| im-apache-03 | name of the image |