Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

On a Macbook pro (M1) the build of OpenIFS, takes about 10 minutes, while successful completion of ifstest takes just over 3 minutes.

...

Basic docker commands

Check for existing containers

From a terminal on the host system, it is possible to list running and exited containers with the following

  1. List running containers

    Code Block
    languagebash
    themeMidnight
    $ docker ps
    CONTAINER ID   IMAGE            COMMAND   CREATED        STATUS         PORTS     NAMES
    d1bd89ccc47f   openifs-48r1.1   "bash"    15 hours ago   Up 5 seconds             beautiful_pasteur

     If no container is running on your system, then only CAPITAL headings are returned with docker ps 

  2. List all containers (running and exited)

    Code Block
    languagebash
    themeMidnight
    $ docker ps -a
    CONTAINER ID   IMAGE               COMMAND       CREATED        STATUS                     PORTS     NAMES
    d1bd89ccc47f   openifs-48r1.1      "bash"        15 hours ago   Exited (0) 4 seconds ago             beautiful_pasteur

    Notice that the STATUS  is Exited, rather than Up, as in (1)

Start an existing container

If docker ps -a shows an exited container it can be restarted using the following

Code Block
languagebash
themeMidnight
$ docker start -i <Container ID> 
# e.g. 
$ docker ps -a
CONTAINER ID   IMAGE               COMMAND       CREATED        STATUS                     PORTS     NAMES
d1bd89ccc47f   openifs-48r1.1      "bash"        15 hours ago   Exited (0) 4 seconds ago             beautiful_pasteur
$ docker start -i  d1bd89ccc47f

This will restart the container but it is important to note that there will be no data or changes retained from when the container has been used in the past.Executing docker run  will always create a new container, which will be retained if the run command does not include the --rm. If a container is not removed when exited, then it can be restarted

Exiting the container

  1. The container can be exited by typing exit from the active container.
  2. A container can be stopped from a terminal on the host system
  • Once exited all data and changes made within the container will be lost. Hence, if necessary, it is important to
    • Push any code changes back to a repo
    • If data is required either set-up a data volume or copy the data back to a local machine, using docker cp 

  1. Start an existing container
  2. Executing docker run  will always create a new container, which will be retained if the run command does not include the --rm. If a container is not removed when exited, then it can be restarted