...
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 and functionality
Check for existing containers
...
List running containers
Code Block language bash theme Midnight $ 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
List all containers (running and exited)
Code Block language bash theme Midnight $ 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
isExited
, rather thanUp
, as in (1)
...
Code Block | ||||
---|---|---|---|---|
| ||||
$ 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 |
...
Exiting the container
- The container can be exited by typing
exit
from the active container. 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
...
Code Block language bash theme Midnight docker stop <Container ID>
It is also possible to stop multiple containers at once by adding more than one ID.
Using
docker stop
will attempt a clean shutdown. It is also possible to stop the container by killing itCode Block language bash theme Midnight docker kill <Container ID>
Removing containers and images
Remove a container with the following command
Code Block | ||||
---|---|---|---|---|
| ||||
docker rm <Container ID> |
It is possible to remove multiple containers at once by adding more than one ID.
It is worth noting that if a container is running it cannot be removed without being forced or being stopped first
Warning |
---|
Removing a container will result in a loss of all data and any code changes etc from the container |