Howto:Docker scenery toolchain

From FlightGear wiki
Revision as of 11:33, 8 June 2018 by Merspieler (talk | contribs) (→‎Docker scenery toolchain image: Simplified getting files into the container by mounting a directory.)
Jump to navigation Jump to search
This article is a stub. You can help the wiki by expanding it.

Docker setup

Firstly, download Docker for your computer. Then check it's working

docker --version  
docker info
docker run hello-world  # Run a demo container
docker container ls -a  # List all the containers, their names and status.  Note that the hello-world is shown as "Exited"

Docker scenery toolchain image

Now retrieve the terragear toolchain image.

docker pull flightgear/terragear
docker images

You can now instantiate containers based on this image. The following command will create a container and then run an interactive bash shell on it.

docker run -i -t flightgear/terragear /bin/bash -v <host directory>:<docker directory>

<host directory> is the directory on your computer that's mounted into the container.
<docker directory> is the directory where the computers directory is mounted in.

When you exit from the bash shell, the container will be stopped. Use the following commands to list all the containers, start the container up, and execute an interactive bash shell on it. To copy file into the docker container, just move them into the <host directory> from above and you'll find them in the <docker directory>.

docker container ls -a    # List all containers, even those stopped
docker container start <container_name>   # Start and existing container
docker container exec -i -t <container_name> /bin/bash   # Run a bash shell, and connect to it.

Now, when you exit, the container will continue running