------------------------------------------- lines 10-179 of file: bin/dock_dismod_at.sh ------------------------------------------- # {xrst_begin dock_dismod_at.sh} # {xrst_spell # busybox # cp # dockerfile # get get # podman # rm # rmi # } # {xrst_comment_ch #} # # Install and Run dismod_at and at_cascade in Docker Images # ######################################################### # # Patching Old Versions # ********************* # If you are using a version of dock_dismod_at.sh that came before 2026, # you will have to patch it using the current version of the # script ``bin/patch_dock_dismod_at.sh`` . # # Purpose # ******* # This bash script will create the dismod_at OCI images. # Using this script is an alternative to going through the steps required to # :ref:`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. # # Images # ****** # #. The headers below are image names and the text below an image name # is the command that creates the image. # #. The *build_type* in each image name is either # ``debug`` or ``release`` ; see # :ref:`dock_dismod_at.sh@build_type` . # #. Each image depends on its previous image; e.g., if you # rebuild ``dismod_at.base`` , you must rebuild all the other images. # The :ref:`release_notes-name` will mention when new versions # of the images are available. # #. 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. # #. 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. # # dismod_at.base # ============== # ./dock_dismod_at.sh base # # dismod_at.mixed.build_type # ========================== # ./dock_dismod_at.sh mixed # # dismod_at.dismod_at.build_type # ============================== # ./dock_dismod_at.sh dismod_at # # dismod_at.at_cascade.build_type # =============================== # ./dock_dismod_at.sh at_cascade # # Working with Images # ******************* # # 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* |space| *container_name*\ ``:/home/work`` # | *driver* ``cp`` *container_name*\ ``:/home/work/``\ *file_name* |space| . # # 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`` : # {xrst_spell_off} # {xrst_code sh} driver='podman' # {xrst_code} # {xrst_spell_on} # 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. # {xrst_code sh} build_type='release' # {xrst_code} # 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`` # {xrst_spell_off} # {xrst_code sh} dismod_at_version='2026.0.1' dismod_at_hash='cac2d8bc518ac7187d9aa3bcb0e0b2ce99b4db8b' # {xrst_code} # {xrst_spell_on} # # at_cascade_version # ****************** # This script can build the following version of ``dismod_at.at_cascade`` # {xrst_spell_off} # {xrst_code sh} at_cascade_version='2026.0.0' at_cascade_hash='78329a9aaf06e797774d9a6e8fd531e3e8694d44' # {xrst_code} # {xrst_spell_on} # # {xrst_end dock_dismod_at.sh}