Using bld.sh to Create the Application Image

Use bld.sh to create an application image from the base image, including the files in AppContainerDirectory.

Usage

bld.sh IacceptEULA app

Parameters

IacceptEULA
Indicates the acceptance of the End User License Agreement (EULA). This parameter is required.
app
Build an image based on the extend image and includes the AppContainerDirectory.

podman Specifications

bld.sh runs the podman build command as follows:

podman build \
   --tag $APPIMAGE \
   --format docker \
   --build-arg BASEIMAGE=$BASEIMAGE \
   --build-arg EXTEND_VERSION=$EXTEND_VERSION \
   --build-arg APPCONTAINERDIRECTORY="$PWD\AppContainerDirectory" \
   --file ${DOCKERFILE}_app \
   .

Where:

--tag
Sets a name for the built application image
--format
Tells bld.sh to use Docker format, which in this case is Docker version 2, schema format 2 for the manifest.
--build-arg
Sets variables that get used in the Dockerfile specified by the --file option.
--file
Specifies the name of the Docker file that contains the application image creation commands.
.
Tells podman to look for files and subdirectories in the current directory.

Dockerfile_linux_x64_app

The Dockerfile_linux_x64_app file contains the following commands to create the application image:

# Name of the repository tag used to create the application image 
# Can be overridden with the --build-arg option in bld.sh 
ARG BASEIMAGE=${BASEIMAGE} 
 
# Use the base extend image to create the application image 
FROM ${BASEIMAGE} 
 
# Default Dockerfile values 
# Values can be overridden with the --build-arg options in bld.sh 
# These need to come after the FROM command or else they will not have a value 
ARG EXTEND_VERSION=${EXTEND_VERSION} 
ARG APPCONTAINERDIRECTORY=${APPCONTAINERDIRECTORY} 
 
# Embed the label information into the application image for identification. 
# This can be viewed with podman image inspect <image-id> 
LABEL vendor="Micro Focus" \ 
      com.microfocus.name="extend-app" \ 
      com.microfocus.version="$EXTEND_VERSION" \ 
      com.microfocus.eula.url="https://supportline.microfocus.com/licensing/lvcontract.aspx" \ 
      com.microfocus.is-base-image="false" 
 
# Copy the local application directory to the root directory in the image 
COPY ["AppContainerDirectory", "/AppContainerDirectory/"] 
 
# Set permissions needed for running the applications 
RUN chmod 644 /AppContainerDirectory/AcuAccess* 
RUN chmod 644 /AppContainerDirectory/*.cfg 
RUN chmod 644 /AppContainerDirectory/*.ini 
RUN chmod 644 /AppContainerDirectory/*.conf 
RUN chmod 644 /AppContainerDirectory/*.acu 
RUN chmod 744 /AppContainerDirectory/*.sh 

If bld.sh runs without errors, you can use the following command to list all the images:

podman images

The application image has the following repository and tag name, including the suffix -app on the repository name to differentiate it from the base image: