3. Build the container

The command ds make will build the image of the container, create the container, and start it. But first we need to be located in the directory of the container:

/var/test # cd app1/
/var/test/app1 # ds make

Use ds info to check the status of the container:

/var/test/app1 # ds info

SETTINGS:
    APPDIR:    /var/test/scripts1
    IMAGE:     scripts1
    CONTAINER: app1
    PORTS:

IMAGE:
    Name:      scripts1:latest
    Created:   3 minutes ago
    Size:      330MB

CONTAINER:
    Name:      app1
    Created:   3 minutes ago
    Status:    Up 2 minutes

Let’s also use the docker commands to check the status of the images and containers:

/var/test/app1 # docker ps
CONTAINER ID   IMAGE      COMMAND                  CREATED          STATUS          PORTS     NAMES
2082d1361748   scripts1   "/lib/systemd/systemd"   3 minutes ago    Up 3 minutes              app1

/var/test/app1 # docker image ls
REPOSITORY   TAG       IMAGE ID       CREATED          SIZE
scripts1     latest    bae91ec96e76   3 minutes ago    330MB
ubuntu       22.04     ba6acccedd29   2 days ago       72.8MB

The command ds make, as well as all the other ds commands, gets the name of the image and the container from settings.sh on the current directory (by including it as a bash script). That’s why we need to be on the container directory before using any ds command.