Open constructor-igor opened 5 years ago
commands:
command docker run ubuntu
after switch to Linux containers:
docker run -it ubuntu bash
kitematic issue:
sample: MySql + Wordpress
docker run --name easql -e MYSQL_ROOT_PASSWORD=abc123 -d mysql:latest
(see details in https://hub.docker.com/_/mysql)
docker run --name some-wordpress --link some-mysql:mysql -d wordpress
docker run --name ealocal --link easql:mysql -p:8080:80 -d wordpress
docker run --name ealocal --link easql -p 8080:80 -e WORDPRESS_DB_HOST=mysql:3306 -e WORDPRESS_DB_USER=root -e WORDPRESS_DB_PASSWORD=Password1234 -e WORDPRESS_DB_NAME=wordpress -e WORDPRESS_TABLE_PREFIX=wp_ -d wordpress
https://hub.docker.com/_/wordpress
http://localhost:8080/wp-admin/install.php
https://wordpress.org/support/forums/ http://www.ntweekly.com/2019/09/20/running-wordpress-and-mysql-on-docker-containers/
version: '2'
services:
wordpress:
image: wordpress
ports:
- "8080:80"
environment:
WORDPRESS_DB_PASSWORD: abc123
mysql:
image: mysql:latest
environment:
MYSQL_ROOT_PASSWORD: abc123
docker pull selenium/hub
docker pull selenium/node-chrome-debug
docker run -d --name selenium-hub selenium/hub
docker run -d -p 4446:4444 --name selenium-hub -P selenium/hub
docker run -d -P --link selenium-hub:hub selenium/node-chrome-debug
nanoserver on windows 2019:
docker pull mcr.microsoft.com/windows/nanoserver:1809
docker run -it mcr.microsoft.com/windows/nanoserver:1809 cmd
simple sample to build windows + .net docker: https://github.com/microsoft/dotnet-framework-docker-samples/tree/master/dotnetapp-4.7
updated: docker file:
FROM microsoft/dotnet-framework
WORKDIR /app
COPY bin/Release/net48 .
ENTRYPOINT ["dotnetapp-4.8.exe"]
to build docket container:
docker build . -t dotnet48-app
to run the container:
docker run dotnet48-app
How to properly override the ENTRYPOINT using docker run
docker run -it --entrypoint "cmd" my_docker_container_image_name
https://blog.sixeyed.com/docker-volumes-on-windows-the-case-of-the-g-drive/ How to amount disk:
docker run -it --entrypoint "cmd" -v C:\Projects\docker\MPlugin\mydata:c:\mydisk my_docker_container_image_name
courses:
https://habr.com/ru/post/310460/ https://habr.com/ru/post/358774/
https://docs.docker.com/docker-for-windows/install/
Pre-requirements: