This repository contains the Dockerfile used to create the parent Tomcat image that will be used by Alfresco engineering teams, other internal groups in the organisation, customers and partners to create images as part of the Alfresco Digital Business Platform.
Currently any pull request to this project should ensure that DOCKER_IMAGE_TAG
,
DOCKER_IMAGE_TAG_SHORT_NAME
are set with the relevant values in build.properties
.
Build-pinning is available on quay to ensure an exact build artifact is used.
This image depends on the alfresco-docker-base-java image, which is also available (privately) on Quay and (publicly) on Docker Hub.
To build this image, run the following script:
docker build -t alfresco/alfresco-base-tomcat .
Builds are available from Docker Hub
docker pull alfresco/alfresco-base-tomcat:8.5
docker pull alfresco/alfresco-base-tomcat:8.5.28-java-8-oracle-centos-7
The builds are identical to those stored in the private repo on Quay, (which also supports build-pinning versions).
docker pull quay.io/alfresco/alfresco-base-tomcat:8.5
docker pull quay.io/alfresco/alfresco-base-tomcat:8.5.28-java-8-oracle-centos-7
docker pull quay.io/alfresco/alfresco-base-tomcat:8.5.28-java-8-oracle-centos-7-f7b1278cc0eb
The image can be used via docker run
to run java applications
with --read-only
set, without any loss of functionality providing the various
directories tomcat writes to are volumes.
With the supplied tomcat configuration, the following should all be mounted on volumes:
/usr/local/tomcat/logs
/usr/local/tomcat/work
/usr/local/tomcat/conf/Catalina
/usr/local/tomcat/temp
Web Applications, Tomcat configuration, etc. can all be supplied by various methods. We recommend using this as a parent image, and then following the recommended practices for passing configuration and secrets for your orchestrator and use case.
For reference, see the documentation on layers, the VOLUME instruction, best practices with VOLUMEs, best practices with persistence, and tmpfs mounts.
Example from a Dockerfile using a public, parent image in Docker Hub.
FROM alfresco/alfresco-base-tomcat:8.5
Example from a Dockerfile using a private, parent image in Quay:
FROM quay.io/alfresco/alfresco-base-tomcat:8.5.28-java-8-oracle-centos-7-f7b1278cc0eb
Used as parent image and with the default configuration, ensure the following volumes are all specified.
VOLUME [ "/usr/local/tomcat/logs", "/usr/local/tomcat/work", "/usr/local/tomcat/conf/Catalina", "/usr/local/tomcat/temp" ]
The Tomcat in this image is running with Security Manager switched on. This may impact performance. The Security Manager can be disabled by overriding the startup command to:
CMD ["catalina.sh", "run"]