dock_dismod_at.sh#

View page source

Install and Run dismod_at and at_cascade in Docker Images#

Purpose#

This bash script will create the dismod_at OCI images. Using this script is an alternative to going through the steps required to install_dismod_at and at_cascade . You can use the following link to get a get a copy of dock_dock_dismod_at/sh If you understand docker, this script also serves as an example install of dismod_at.

Syntax#

Command

image_name

./dock_dismod_at.sh base

dismod_at.base

./dock_dismod_at.sh mixed

dismod_at.mixed.build_type

./dock_dismod_at.sh dismod_at

dismod_at.dismod_at.build_type

./dock_dismod_at.sh at_cascade

dismod_at.at_cascade.build_type

  1. The build_type can be debug or release ; see build_type .

  2. Each image above depends on its previous image; e.g., if you rebuild dismod_at.base , you must rebuild all the other images. The release_notes will mention when new versions of the images are available.

  3. The image commands above will not execute if the corresponding image already exists. You must remove containers that use an image and then remove the image, before you can create a new version of the image.

  4. The commands above will create a Dockerfile in the current working directory. If such a file already exists, it will need to be moved or deleted before the command can be executed.

Create A Container#

driver run -it --name container_name image_name bash

Resume Container#

driver start container_name
driver exec -it container_name bash

Copy Files#

driver cp file_name   container_name:/home/work
driver cp container_name:/home/work/file_name   .

Remove Container#

driver stop container_name
driver rm container_name

Remove Image#

driver rmi image_name

driver#

The driver program, determined by this setting, can be either docker or podman :

   driver='podman'

Above and below we refer to the value of this shell variable as driver . Both docker and podman create Open Container Initiative OCI images and containers.

build_type#

The build_type , determined by this setting, can be either debug or release : The debug version is much slower but does much more error checking.

   build_type='release'

The same base image, dismod_at.base can be used for both debug and release builds. All the other images names depend on the build type and have the build type at the end of the name.

Logging Output#

You can save the output of any of the commands above by redirecting standard output and standard error to a file. For example,

./dock_dismod_at.sh base >& log_file

will redirect standard output and standard error to log_file . If you do this, you will not see the progress during execution. If also want to monitor the progress, in another window use

tail -f log_file

This tail command will not terminate until you enter control-C in the window where it is running.

Requirements#

You must have a copy of docker, or podman installed on your system. You can test this on your system by trying to execute the following command:

driver run busybox echo 'Hello World'

dismod_at_version#

This script can build the following version of dismod_at.dismod_at

   dismod_at_version='20240310'
   dismod_at_hash='7f62277fd126125e422b795b1e209bc6821de652'

at_cascade_version#

This script can build the following version of dismod_at.at_cascade

   at_cascade_version='2024.3.12'
   at_cascade_hash='2a79882bb152536ffa0254a114b11466afc12efb'