-
Notifications
You must be signed in to change notification settings - Fork 8
Instructions for installing Docker on Windows
The version of Docker you need depends on the version of Windows you are running.
If you are running Windows 10 Pro or Windows Server (unlikely) then you can use the current Docker for Windows Community Edition which is the recommended version if possible. Follow the link above to download Docker and install it. Note that this version of Docker requires activation of the Hyper-V hypervisor and doing so disables the ability to run Virtual Box or VMWare.
If you see the following error, you don't have a compatible version of Windows.
Installation failed: one pre-requisite is not fullfilled
Docker for Windows requires Windows 10 Pro or Enterprise version 14393, or Windows server 2016 RTM to run.
If you are running a Home version of Windows 10 or older versions of Windows, then the current Docker for Windows will not run on your system and you will need to run Docker Toolkit instead. You can find installation instructions for Docker Toolkit on the Docker Wiki.
This installation process also installs VirtualBox which is needed to run the Fermi Software Docker container. If you already have Virtual Box installed, you should be able to uncheck that box on the appropriate dialog box. Otherwise, be sure that it is installed. Otherwise follow the instructions at the link above and accept the defaults and you should be good to go.
Note for users with multiple drives: If you wish to have Docker store images and data on a different drive than the default C: drive you must change the location of your virtual machine storage in the Hyper-V Manager before installing Docker. You can do this by opening the Hyper-V Manager application, right clicking the name of your machine, selecting Hyper-V Setting
', then changing the path location for Virtual Hard Disks
and Virtual Machines
.
In addition to installing Docker, you'll need an XWindows server installed as well. We have tested the Xming XWindows server and found it to work just fine.
To install Xming, download the installer from the software homepage. When you run the installer, be sure to install the XLaunch application and select the "Associate XLaunch with the .xlaunch file extension" option during installation.
To start the Xserver for the first time, run XLaunch and make the following selections on the various dialog boxes:
- No changes on the first screen, click "Next".
- No changes on the second screen, click "Next".
- Select "No Access Control" on screen three. Click "Next".
- If you want to not have to go through this each time, select "Save Configuration" and name your .xlaunch file. You can then just double click this file to start in the future.
- Click "Finish" to start the X11 server.
This will depend slightly on the version of Docker you are using. Follow the instructions below noting any specific variations for the appropriate version you have installed.
- Docker for Windows: Click on the "Docker for Windows" entry in the start menu.
- Docker Toolkit: Nothing needed here. Docker will be started when you launch the terminal in the next step.
- Docker for Windows: You can open either a PowerShell or command prompt window.
- Docker Toolkit: In this version you need to use the shell window provided by Docker that has been pre-configured to work properly. Click on the "Docker Quickstart Terminal" entry under the Docker menu in the start menu (or the desktop icon if you had that created).
We're almost there. You just need a little bit more information. For the docker container to connect to the Xserver, it needs to know your computer's IP address. Then we'll set a variable to hold that information. We also need to decide where we're going to store the data we're working with on the local drive and set up that path.
On the command line (in the Powershell, command prompt, or Docker Terminal):
- Run
ipconfig
and find the IP address for your primary network connection. Note this down somewhere. - Select an existing directory to store your data and note the path (e.g. d:/data/FERMI)
- Run
set-variable -name DISPLAY -value <ip address>:0.0
Pick a directory on your computer where you would like to have the data you are working with stored. The docker container is designed to share this directory with the host operating system. You can pick any directory you like on your Windows computer but it will located at /data in the container making it easy to access. If you are using Docker Toolkit, you will need to pick (or create) a directory that is under the C:/Users/<your username> directory or the container will not be able to properly access it.
We need to note down the path to this directory for use when launching the container. The format will depend on the version of docker you are using.
- Docker for Windows: This is uses the simple Windows path directly. For example, if you have a directory on your C: drive called "FermiSummerSchool" that you want to store data in, the path would simply be C:/FermiSummerSchool.
- Docker Toolkit: This uses a slightly modified version of the path. If you were using the same FermiSummerSchool directory as above the path would be written out as //c/FermiSummerSchool instead.
We strongly recommend you have a path with no spaces in it for simplicity. However if you do have spaces in your path, it should would just fine since the path will be enclosed with single quotes when you use it in the command to launch the container.
Note down the path in whichever format is needed for your version of Docker. We'll be using it in the next step.
Okay. Now we're ready to go. You start the docker container by running:
docker run --init -it \
-e DISPLAY=$DISPLAY \
-v '<path to data>:/data' \
-p 8888:8888 \
fssc/fermibottle
where <path to data> is simply the path you selected in the previous step. Note: If the selected directory isn't set up for sharing, Docker will ask if you want to share it. Select 'Share' and then enter your password at the prompt. You need to be an administrator in order to do this.
You are now ready to start your analysis.
This should start up the docker container with a command prompt and be ready to go. If this is your first time running the container, it will need to download it (about 3 GB of data) so it may take a few minutes to get started depending on your network connection. Be patient and it provides updates as it goes.
If you get an error saying "no space left on device", this means that for some reason, the VM created by Docker Toolkit (Windows Home only) is not quite big enough to download and extract the FermiBottle image so we need to make a slightly larger one. Run the following two commands in the Docker Quickstart Terminal:
docker-machine rm default
docker-machine create -d virtualbox --virtualbox-disk-size "20000" default
This will make a new default VM that has a 20GB disk. You only have to do this once as Docker will use this VM each time you launch in the future. You are now ready to actually start the container
https://github.com/fermi-lat/FermiBottle/wiki/Using-the-Fermibottle-container
I'm a Fermi in a bottle, baby. Gotta docker run
me the right way.