Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Docker on Windows 10 and Server 2016 #443

Open
constructor-igor opened this issue Oct 22, 2019 · 10 comments
Open

Docker on Windows 10 and Server 2016 #443

constructor-igor opened this issue Oct 22, 2019 · 10 comments
Assignees
Labels

Comments

@constructor-igor
Copy link
Owner

constructor-igor commented Oct 22, 2019

courses:

https://habr.com/ru/post/310460/
https://habr.com/ru/post/358774/

https://docs.docker.com/docker-for-windows/install/

Pre-requirements:

  • Windows 2016 and above or Windows 10 Pro 64 bits (with latets update)
  • Microsoft Hyper-V to run
@constructor-igor
Copy link
Owner Author

image

@constructor-igor
Copy link
Owner Author

constructor-igor commented Oct 23, 2019

commands:

  • docker --help
  • docker --version
  • docker ps
  • docker ps -a
  • docker images
  • docker stop
  • docker logs
  • docker port
  • docker run ubuntu

@constructor-igor
Copy link
Owner Author

constructor-igor commented Oct 23, 2019

command docker run ubuntu

image

after switch to Linux containers:
image

docker run -it ubuntu bash

image

image

@constructor-igor
Copy link
Owner Author

kitematic issue:

image

@constructor-igor
Copy link
Owner Author

constructor-igor commented Oct 24, 2019

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
image

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

@constructor-igor
Copy link
Owner Author

constructor-igor commented Oct 24, 2019

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

@constructor-igor
Copy link
Owner Author

nanoserver on windows 2019:
docker pull mcr.microsoft.com/windows/nanoserver:1809
docker run -it mcr.microsoft.com/windows/nanoserver:1809 cmd

@constructor-igor
Copy link
Owner Author

constructor-igor commented Oct 27, 2019

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

@constructor-igor
Copy link
Owner Author

constructor-igor commented Oct 30, 2019

How to properly override the ENTRYPOINT using docker run

docker run -it --entrypoint "cmd" my_docker_container_image_name

@constructor-igor
Copy link
Owner Author

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant