https://github.com/dgroup/docker-on-windows
Set up docker, docker-compose inside vagrant VM on Windows OS
https://github.com/dgroup/docker-on-windows
docker-windows vagrant-docker-windows
Last synced: about 1 year ago
JSON representation
Set up docker, docker-compose inside vagrant VM on Windows OS
- Host: GitHub
- URL: https://github.com/dgroup/docker-on-windows
- Owner: dgroup
- Created: 2017-09-29T05:28:56.000Z (over 8 years ago)
- Default Branch: master
- Last Pushed: 2019-04-11T05:55:49.000Z (about 7 years ago)
- Last Synced: 2025-02-06T10:31:56.235Z (over 1 year ago)
- Topics: docker-windows, vagrant-docker-windows
- Language: Shell
- Homepage:
- Size: 7.81 KB
- Stars: 1
- Watchers: 2
- Forks: 2
- Open Issues: 0
-
Metadata Files:
- Readme: readme.md
Awesome Lists containing this project
README
[](https://gitter.im/dgroup/docker-on-windows?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)
#### Docker on Windows
##### The pain
Unfortunately, there are a lot of developers who have to work in WinOS. I also have one workstation with WinOS.
The docker doesn't work properly on Win7, thus, we have to use a workaround with Vagrant box.
##### Installation
1. Install `VirtualBox-5.1.14-112924` (or later)
2. Install `vagrant_1.9.1.msi` (or later)
3. Run `create_dev_vm.bat`
##### Vagrant F.A.Q.
1. Basic commands
```shell
vagrant init # Create a new VM based on (new Vagrantfile will be created)
vagrant global-status # Display parameters for the all created VMs
# All comannds below should be executed from the directory with Vagrantfile
vagrant up # Start up the local VM
vagrant reload # Reboot VM
vagrant ssh # Connect to the local VM
vagrant snapshot save # Create a snapshot of VM
vagrant snapshot restore # Restory the VM to the particular snapshot
vagrant snapshot delete # Delete particular snapshot of VM
vagrant ssh-config # Show the ssh configuration (port, identity file, etc)
vagrant suspend # Suspend the current state of VM
vagrant destroy # Remove particular VM by id. You can detect the id by `vagrant global-status` command
```
2. How can I share the files across host `winOS` and guest Linux VM?
Check the `config.vm.synced_folder` parameter in `Vagrantfile`.
3. How can I call the web applications inside of Docker containers hosted in guest Linux VM?
Check the `config.vm.network "forwarded_port"` parameter in `Vagrantfile`.
##### Docker F.A.Q.
1. Prepare environment
```bash
docker start # start particular container
docker start -i # start particular container in interactive mode
docker stop # stop particular container
docker ps # display all running containers
docker ps -a # display all existing containers (stopped)
docker exec -it /bin/bash # join to the container via bash
docker rm # remove particular container
docker rmi # remove particular image
docker pull # download particular image from the remote repository (NC Artifactory, dockerhub, etc)
```
2. Monitoring
```bash
# Display on-line information regarding system usage (CPU,RAM,IO) per container
docker stats $(docker ps --format '{{.Names}}')
docker stats $(docker ps | awk '{if(NR>1) print $NF}')
```