This docker container is for building the LSDTopoTools documentation. Only use it if you are actually going to update the documentation. If you just want to read the documentation, go to the documentation website.
These are the bare bones instructions. For a bit more detail and potential bug fixes, scroll down to the section on Docker notes.
- Download and install Docker for Windows (only works with Windows 10 enterprise), Docker for Mac, or Docker for Ubuntu or Debian.
- On MacOS we recommend installing docker using brew:
brew cask install docker
- On MacOs and Linux, after you install docker you will need to add permissions:
sudo usermod -a -G docker $USER
- On Windows 10 you will need to alter a bunch of settings. See [DNSection][Docker notes]
- We will henceforth assume that you actually have a functioning version of Docker on your host machine. If you want more details about how to use docker, or getting it set up (particularly in Windows, in Linux and MacOS this is more straightforward), see our Docker notes.
- You will want to be able to see LSDTopoTools output on your host operating system, so we will need to create a directory for hosting your LSDTopoTools data, code, and scripts.
- For the purposes of this tutorial, I will assume you are using windows and that you have made a directory
C:\LSDTopoTools
.
- You can put this directory anywhere you want as long as you remember where it is. You don't need to put anything in this directory yet.
- To get the container, go into a terminal (MacOS or Linux) or Powershell window (Windows) that has docker enabled and run:
$ docker pull lsdtopotools/lsdtt_docs_docker
- Now you need to run the container:
$ docker run -it -v C:\LSDTopoTools\LSDTT_documentation:/documents lsdtopotools/lsdtt_docs_docker
- The
-it
means "interactive". - The
-v
stands for "volume" and in practice it links the files in the docker container with files in your host operating system. - After the
-v
you need to tell docker where the directories are on both the host operating system (in this caseC:\LSDTopoTools\LSDTT_documentation
) and the container (in this case/documents
). Note that the work directory for the documentation is in a directory calleddocuments
and notLSDTopoTools
. The two directories are separated by a colon (:
). - Once you do this you will get a
#
symbol showing that you are inside the container. - To exit the container use
ctrl-D
. The containers all have linux environments so you will be able to use linux command line tools within the docker container.
- You don't actually have any of the files in the docker container. You need to clone them.
- If you are in your docker container, go somewhere you want to put the files and do this:
# git clone https://github.com/LSDtopotools/LSDTT_documentation.git master
- This clones into a "master" directory.
- You can also clone on your host operating system but if you don't have
git
, the container does have it.
- It seems the rub gems installation causes some incompatibilities. So you need to do the following:
- Go into the
LSDTT_python_tools
directory (you may have to first go into a master directory if you have followed the recommended file structure). - Run
# bundle install
- Go back into thge main directory.
- Your docker container needs to be running. You should use
git pull origin master
to get the latest version of the documentation. To do this you will have needed toclone
the repository (see part 3). - Go into the directory with the documentation.
- Run the python script:
$ python compile_LSDTTDocs.py
- The documentation should be built in a directory called
html_build
.
If you want to know all about Docker, make sure to read the docker documentation. A note of warning: Docker documentation is similar to documentation for the turbo encabulator. Below are some brief notes to help you with the essentials.
Here are some shortcuts if you just need a reminder of how docker works.
List all containers
$ docker ps -a
List containers with size
$ docker ps -as
Remove all unused containers
$ docker system prune
After you install docker on Linux, you will need to add users to the docker permissions:
$ sudo usermod -a -G docker $USER
Once you have done this you will need to log out and log back in again.
I have not made any scientific study of this but most LSDTopoTools users are on Windows operating systems.
Firstly, you need to have Windows 10 Enterprise. It will not work otherwise (well, that is not exactly true but getting it to work on Windows 7 is a massive pain). If you don't have Windows 10 Enterprise but are on Windows you probably should use Vagrant; see our vagrant documentation. If you do have Windows 10 enterprise then you can download and install Docker for Windows CE. After you install this you will need to restart your computer not once but twice: once after install and a second time to activate the hyper-V feature, which allows you to have 64 bit guest operating systems.
Second, if you have that and have it installed, you might also need to add yourself to the docker-users
group. To do that, do this (instructions from here: docker/for-win#868):
- Logon to Windows as Administrator
- Go to Windows Administrator Tools
- Look for Windows Computer Management and click on it.
- Or you can skip steps 1-3, right mouse clicking Computer Management, go to more, and select run as administrator and provide Administrator password.
- Double click docker-users group and add your account as member.
- Also add your account to Hyper-V Administrator. This was added when you installed docker for Windows.
- Log off from Windows and log back on.
- Click on Windows icon on bottom left and start Docker for Windows. This will start docker windows service.
- Start Windows Powershell and type docker --version. It will show Docker version 17.09.1-ce, build 19e2cf6, or whatever version you have.