[ https://issues.apache.org/jira/browse/QPID-8352?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17785484#comment-17785484 ]
ASF GitHub Bot commented on QPID-8352: -------------------------------------- dakirily commented on code in PR #225: URL: https://github.com/apache/qpid-broker-j/pull/225#discussion_r1391084149 ########## qpid-docker/README.md: ########## @@ -0,0 +1,242 @@ +## Docker Image Example + +This is an example on how a Docker Image For Apache Qpid Broker-J based on Eclipse Temurin JRE image can be created. + +## Building Container Image + +To use an official Apache release in your image run the following command from the qpid-docker directory where +<QPID_RELEASE_VERSION> is the release version you wish to use (e.g. 9.1.0): + +``` +cd qpid-docker + +docker-build.sh --release <QPID_RELEASE_VERSION> +``` + +This will download the Qpid Broker-J release and copy all the files necessary to build the pre-configured Docker image +and provide you with additional instructions. Follow these instructions to finish building the image you want based on +the provided Docker file or even one of your own. + +If you would rather prefer to build the docker image from local Broker-J distribution, build the parent project using +the command + +``` +mvn clean install -DskipTests=true +``` + +Navigate to the module 'qpid-docker': + +``` +cd qpid-docker +``` + +Execute the command + +``` +docker-build.sh --local-dist-path <PATH_TO_LOCAL_QPID_DISTRIBUTION> +``` + +This will copy all the files necessary to build the pre-configured Docker image and provide you with additional +instructions. Follow these instructions to finish building the image you want based on one of the provided Docker file +or even one of your own. + +### Container Structure + +Broker-J files are copied to the folder /qpid-broker-j \ +This folder belongs to user qpid, which is part of the root group. Java process is executed under the qpid user as well. + +### Running the Container + +Container can be started using following command: +``` +docker run -d -p 5672:5672 -p 8080:8080 --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: + +| Environment Variable | Description | +|----------------------|------------------------------------------------------------------------------| +| JAVA_GC | JVM Garbage Collector parameters, default value "-XX:+UseG1GC" | +| JAVA_MEM | JVM memory parameters, default value "-Xmx300m -XX:MaxDirectMemorySize=200m" | +| JAVA_OPTS | Further JVM parameters, empty by default | + +#### 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_DIRECTORY_ON_HOST>:/qpid-broker-j/work --name qpid <IMAGE_NAME> +``` +or +``` +podman run -d -p 5672:5672 -p 8080:8080 -v <BROKER_DIRECTORY_ON_HOST>:/qpid-broker-j/work:Z --name qpid <IMAGE_NAME> +``` + +### Stopping the Container + +Running container can be stopped using following command: +``` +docker stop <CONTAINER_NAME> Review Comment: Fixed > Official Docker image for Broker-J > ---------------------------------- > > Key: QPID-8352 > URL: https://issues.apache.org/jira/browse/QPID-8352 > Project: Qpid > Issue Type: Improvement > Components: Broker-J > Reporter: Chris O'Brien > Priority: Minor > > Currently there is no official Docker image for Broker-J. > It would be great if one was provided, as there are more than a few people > interested in running Broker-J in a container, shown by the handful of > inflexible and un-maintained Dockerfiles/images for Broker-J floating around > GitHub/Docker Hub. > -- This message was sent by Atlassian Jira (v8.20.10#820010) --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscr...@qpid.apache.org For additional commands, e-mail: dev-h...@qpid.apache.org