Volume mapping
Volume mapping is used to persist container files on the host. Volume mapping can also be used to update configuration files in the container. For more information about docker volume, refer docker documentation.
Configuration file
You can configure the CICS® Transaction Gateway based on your requirements by modifying the gateway configuration file ctg.ini. For more information about configuring ctg.ini, see Configuring CICS Transaction Gateway
Use the following command to update a configuration file ctg.ini in a
container.
docker run -d -v <host-dir>:<container-dir> -e LICENSE=accept --name \
<container_name> ibm-cicstg-container-linux-x86:9.3 where,
<host-dir> and <container-dir> volumes are mapped. The
<container-dir> is the container directory in which ctg.ini
is present. The default location of ctg.ini file in container is
/var/cicscli. This can be changed in /var/cicscli/ctgd.conf file inside
container. <host-dir> is the host directory where the
ctg.ini to be used is present.For
example,
docker run -d -v /home/user/cicscli:/var/cicscli -e LICENSE=accept --name \
<ctgcontainer> ctgserveribm-cicstg-container-linux-x86:9.3 This maps host volume
/home/user/cicsli to container volume /var/cicscli. This assumes that the
configured path of ctg.ini in container is /var/cicscli.
/home/user/cicsli is the host volume on which the ctg.ini
to be used is present.Ensure that the host directory has read/write permission for the user ID same as user ID of
container user. You can also run a container with the host user as
follows:
docker run -d -e LICENSE=accept -u <host_user> -v <host-dir>:<container-dir> --name \
<ctgcontainer> ibm-cicstg-container-linux-x86:9.3If you use seLinux, you can add the z or Z options to modify the selinux label of the host file
or directory being mounted into the container. For
example,
docker run -d -e LICENSE=accept -v /var/cicscli:/var/cicscli:z --name \
<container_name> ibm-cicstg-container-linux-x86:9.3Note: The ctg.ini file can be copied to container by using docker cp
command.
Trace files
By default, trace files are stored in the /var/cicscli directory. The volume
can be mapped to a host volume to persist the
traces.
docker run -d -v /home/user/cicscli:/var/cicscli -e LICENSE=accept --name <container_name> \
ibm-cicstg-container-linux-x86:9.3