cshc / cshc_website

The main repository for the Cambridge South Hockey Club website source code
3 stars 0 forks source link

Run the website within a Docker container #211

Open drrobbarton opened 7 years ago

drrobbarton commented 7 years ago

Personally, I think this would be create as it could be extremely useful; it may even encourage more people to join the dev / bug-fix effort!

grahammcculloch commented 7 years ago

I'll leave some notes here and add to them as I go...

For Windows Home, you need to install Docker Toolbox instead of Docker For Windows (due to the lack of Hyper-V). Just accept all defaults in the installer. This provides you with the Docker Quickstart Terminal as well as installing Kitematic (a GUI for running containers) and the VirtualBox virtualizer.

When first running Docker Quickstart Terminal I got an error saying This computer doesn't have VT-X/AMD-v enabled. I restarted my machine, entered the BIOS menu and enabled Hardware Virtualization. Then I tried again and it worked:

Running pre-create checks...
(default) Image cache directory does not exist, creating it at C:\Users\admin\.docker\machine\cache...
(default) No default Boot2Docker ISO found locally, downloading the latest release...
(default) Latest release for github.com/boot2docker/boot2docker is v17.07.0-ce
(default) Downloading C:\Users\admin\.docker\machine\cache\boot2docker.iso from https://github.com/boot2docker/boot2docker/releases/download/v17.07.0-ce/boot2docker.iso...
(default) 0%....10%....20%....30%....40%....50%....60%....70%....80%....90%....100%
Creating machine...
(default) Copying C:\Users\admin\.docker\machine\cache\boot2docker.iso to C:\Users\admin\.docker\machine\machines\default\boot2docker.iso...
(default) Creating VirtualBox VM...
(default) Creating SSH key...
(default) Starting the VM...
(default) Check network to re-create if needed...
(default) Windows might ask for the permission to create a network adapter. Sometimes, such confirmation window is minimized in the taskbar.
(default) Found a new host-only adapter: "VirtualBox Host-Only Ethernet Adapter #2"
(default) Windows might ask for the permission to configure a network adapter. Sometimes, such confirmation window is minimized in the taskbar.
(default) Windows might ask for the permission to configure a dhcp server. Sometimes, such confirmation window is minimized in the taskbar.
(default) Waiting for an IP...
Waiting for machine to be running, this may take a few minutes...
Detecting operating system of created instance...
Waiting for SSH to be available...
Detecting the provisioner...
Provisioning with boot2docker...
Copying certs to the local machine directory...
Copying certs to the remote machine...
Setting Docker configuration on the remote daemon...
Checking connection to Docker...
Docker is up and running!
To see how to connect your Docker Client to the Docker Engine running on this virtual machine, run: C:\Program Files\Docker Toolbox\docker-machine.exe env default

                        ##         .
                  ## ## ##        ==
               ## ## ## ## ##    ===
           /"""""""""""""""""\___/ ===
      ~~~ {~~ ~~~~ ~~~ ~~~~ ~~~ ~ /  ===- ~~~
           \______ o           __/
             \    \         __/
              \____\_______/

docker is configured to use the default machine with IP 192.168.99.100
For help getting started, check out the docs at https://docs.docker.com

Start interactive shell

admin@DESKTOP-S9E7TKT MINGW64 ~
$ docker -v
Docker version 17.06.0-ce, build 02c1d87
npscience commented 7 years ago

FYI Lagoon, but it's for Drupal