Apama 10.7.2 | Deploying and Managing Apama Applications | Deploying Apama Applications with Docker | Building an Apama image from the current installation
 
Building an Apama image from the current installation
As an alternative to using the image from Docker Hub, the Apama installation provides a Dockerfile which enables you to build an image. You can find it in the samples/docker/image directory of your Apama installation. See the README.txt file in the samples/docker directory for detailed instructions.
1. To build the image, run the following command from your Software AG installation directory (by default, this is /opt/SoftwareAG):
docker build --tag registrytag -f ./Apama/samples/docker/image/Dockerfile .
If you wish to publish the image to a registry, then registrytag should be of the following form:
registryhost/organization/imagename:tag
Note that the image will be stored locally, but it can be published to your registry as described below.
2. Enter the following command to publish the image:
docker push registrytag
3. Enter the following commands to use the image:
docker pull registrytag
 
docker run -d --name container --rm registrytag
 
docker logs container
 
docker stop container
You can now use the image in the same way as described in Quick start to using an Apama image, by referring to the registry name on the command line. You can also refer to it in the Dockerfile; see Apama samples for Docker for examples of how to refer to images in Dockerfiles.