ARTEMIS-4408 Update docker-run.sh for etc override
After creating the artemis docker image using the docker-run.sh script,
it is not possible to map a user supplied broker.xml using a volume
mapping. The broker.xml file is not there before instance creation,
so we cannot a static file mapping.
This change introduces an etc-override folder to write over the etc
folder contents. If a folder named etc-override exists inside the
instance folder, its contents will be copied over to etc folder after
instance creation. In order to use custom files that reside in etc,
eg. broker.xml or artemis.profile; it is sufficient to place these
files to a folder and map it to /var/lib/artemis-instance/etc-override
folder of the image.
The usage is also documented in readme.md file under the docker folder.
This is a clarification of the steps required to create a docker image
from ActiveMQ source using the local-distribution method and a couple
of formatting recommendations.
The goal for this file is to be used in conjunction with the existing
Dockerfile-ubuntu-11-jre when pushing images to
https://hub.docker.com/r/apache/activemq-artemis.
I also updated the documentation.
Eclipse is now maintaining the Adopt OpenJDK project. Due to that change
the base adoptopenjdk image used in the Dockerfile is no longer
supported. This commit is just changing the base image to match the
recommended replacement in the deprecation notice (i.e.
https://hub.docker.com/_/adoptopenjdk).
Scripts:
- Fix the preapre-docker.sh to exit with 0 instead of 1 on success
On pom files:
- Change e2e-tests variable names to e2e-tests.xxxxxx for clarity on
e2e-tests variables
- Add e2e-tests.skipImageBuild variable to control if the docker image
will be build (defaults to not build)
- Add e2e-tests.dockerfile variable to specify the dockerfile to be
used (defaults to Dockerfile-centos)
- Bump testcontainers version to 1.16.3
- Add artemis distribution dependency since the docker image build
depends on it
On ContainerService class:
- Fix exposePorts and exporseFolder to use SELinux shared mode
otherwise the mount fails on machines with SELinux enabled
- Move the logic to use specific user on container from generic start
method to broker specific method to avoid affect other images
- Update the broker image name to a more generic name (activemq-artemis
instead of artemis-centos)
- Update the broker image tag to match with the project version in pom
file
Changed group and user ids to 1001 to allow Artemis user to be the own
of /var/lib/artemis-instance and /opt/activemq-artemis. Otherwise the
owner will be root (1000).
This was already done in Dockerfile-centos file.
Fixes the Dockerfiles handling of ANONYMOUS_LOGIN and adds an
EXTRA_ARGS environment variable to allow specifying extra arguments
separate from the username, password and anonymous login options.