How to Install docker on windows 10 ?

Piyachart Kongsuwan
2 min readFeb 2, 2018

--

https://www.docker.com/docker-windows

(1) Download Docker for Windows from website.

https://www.docker.com/docker-windows

(2) Install Docker Compose.

How to Install Docker Compose ?

the command for install docker compose.

(3) Open Windows PowerShell(Admin) and Running the command “docker -v” and “docker-compose -v”

If this shows, the docker is ready to work.

(4) Create folder and create file in folder name is “docker-compose.yml” by using this code.

version: ‘3’

services:
db:
image: mysql:5.7
volumes:
— ./db_data:/var/lib/mysql
restart: always
environment:
MYSQL_ROOT_PASSWORD: somewordpress
MYSQL_DATABASE: wordpress
MYSQL_USER: wordpress
MYSQL_PASSWORD: wordpress

wordpress:
depends_on:
— db
image: wordpress:latest
ports:
— “8000:80”
restart: always
environment:
WORDPRESS_DB_HOST: db:3306
WORDPRESS_DB_USER: wordpress
WORDPRESS_DB_PASSWORD: wordpress

Create folder and file.
code for using the WordPress server

(5) Running command “docker-compose up -d” on Windows PowerShell(Admin)

waiting for downloading.
docker compose is ready.

(6) Try to run command “docker ps”

If this shows, is ready to use WordPress.

(7) Visit to “localhost: 8000” on web browser.

done.

(8) To stop the server, use the command.

docker-compose down

(9) To remove a container, default network and database, use the command.

docker-compose down --volumes

--

--