Docker - Running on Windows
Updated at 2014-09-27 00:08
This is a checklist for running Docker on Windows.
- Install Fedora 20 on VirtualBox.
- Docker doesn't work on Windows or Mac OS X so you have to use a virtual machine for local development.
Download Fedora: https://fedoraproject.org/ For example: Fedora-Live-Desktop-x86_64-20-1.iso
In VirtualBox: Create a new virtual machine: Name: FedoraDocker Type: Linux Version: Fedora (64 bit) Memory Size: 2048 MB or anything over 1024MB Create a virtual hard drive now: VDI (VirtualBox Disk Image) Fixed Size 10 GB FedoraDocker.vdi Settings => Storage => IDE: Empty => Mount the Fedora iso. Start FedoraDocker and follow instructions to install Fedora. Shutdown the virtual machine. Settings => Storage => IDE => Unmount Fedora iso. Start the virtual machine.
- Enable admin rights for your Fedora user.
# `wheel` group is administration group in Fedora and allows sudoing. su -c "usermod -g wheel <YOUR_USERNAME>"
- Share a folder from the host to the virtual machine for faster development.
# Settings => Shared Folders => Add # Select the folder you want to share with Fedora installation. # Enable auto-mount. # # Start up Fedora and login. # Devices > Insert Guest Additions CD # Install any dependencies the CD asks you to install. # E.g. kernel-devel-3.11.10-301.fc20.x86_64 and gcc.x86_64. # Unmount the CD and mount it again. # Repeat until you have the guest additions installed. # # Add your user to the group that is allowed to access shared folders. sudo usermod -a -G vboxsf <YOUR_USERNAME> # Restart Fedora. # # Check that you can access the shared folder. cd /media ls cd <NAME_OF_YOUR_SHARED FOLDER>
- Install Docker on Fedora.
sudo yum install docker-io # Install Docker. sudo systemctl start docker # Start Docker daemon. sudo systemctl enable docker # Start Docker daemon on boot. sudo docker run -i -t fedora /bin/bash # Try out that it works.
- Test access to Docker hosted ports from the host machine.
# Settings => Network => Adapter 1 (NAT) => Advanced => Port Forwarding # Add new rule, from Host Port 6379 to Guest Port 6379. # Now you can access the server running on the Docker with: localhost:6379