Menu Search

12.2. Running the Container

12.2.1. Container Start

Container can be started using following command:

                    docker run -d -p 5672:5672 -p 8080:8080 --name qpid <IMAGE_NAME>
                

or

                    podman run -d -p 5672:5672 -p 8080:8080 -v qpid_volume:/qpid-broker-j/work:Z --name qpid <IMAGE_NAME>
                

There are two ports exposed: 5672 for AMQP connections and 8080 for HTTP connections.

There are following environment variables available when running the container:

Table 12.1. Environment Variables

Environment VariableDescription
JAVA_GCJVM Garbage Collector parameters, default value "-XX:+UseG1GC"
JAVA_MEMJVM memory parameters, default value "-Xmx300m -XX:MaxDirectMemorySize=200m"
JAVA_OPTSFurther JVM parameters, default value is an empty string

12.2.2. Container Volume

The image will use the directory /qpid-broker-j/work to hold the configuration and the data of the running broker. To persist the broker configuration and the data outside the container, start container with the volume mapping:

                    docker run -d -p 5672:5672 -p 8080:8080 -v <BROKER_DIRECTOR_ON_HOST>:/qpid-broker-j/work --name qpid <IMAGE_NAME>
                

or

                    podman run -d -p 5672:5672 -p 8080:8080 -v <BROKER_DIRECTOR_ON_HOST>:/qpid-broker-j/work:Z --name qpid <IMAGE_NAME>
                

12.2.3. Stopping the Container

Running container can be stopped using following command:

                docker stop <CONTAINER_NAME>