This repository contains the Dockerfile used to create the base Java image based on Centos 7 that will be used by Alfresco engineering teams, other internal groups in the organization, customers and partners to create Java images from.
Please be aware that:
jdk
flavoured builds are provided only for development purposes and are not meant to be used in production, please use the lighterjre
flavour.- we are providing jre images based on different OS but at the time of writing
only
jre11-centos7
is passing security scan on our private quay.io. You can check for updated security scans results on the quay.io image page.
Choose between one of the available flavours built from this repository:
- Docker Hub image name:
alfresco/alfresco-base-java
- Quay image name:
quay.io/alfresco/alfresco-base-java
Example final image: alfresco/alfresco-base-java:jre11-centos7
If you are using this base image in a public repository, please stick to the DockerHub published image.
These tags get overwritten to always have an up-to-date image and hopefully without security issues.
For being in control of the image update process, you can use the digest in
addition to the tag in your Dockerfile
, for example:
FROM alfresco/alfresco-base-java:jre11-centos7@sha256:59a453e01fd958a3748a2e9b0ca99cdf3410f98eeb245499c7bb31696e35bdf4
To discover the latest image digest, just run a docker pull and copy the
Digest
value.
docker pull quay.io/alfresco/alfresco-base-java:jre11-centos7
# jre11-centos7: Pulling from alfresco/alfresco-base-java
# ...
# Digest: sha256:59a453e01fd958a3748a2e9b0ca99cdf3410f98eeb245499c7bb31696e35bdf4
# Status: Downloaded newer image for quay.io/alfresco/alfresco-base-java:jre11-centos7
This configuration is compatible with Dependabot.
While any docker installation will produce valid images, building with BuildKit has proven being more efficient and clever with Multistage builds. If you are building images locally, we recommend enabling it.
The images built from this repository are named as follow:
<JAVA_DISTRIBUTION_TYPE><JAVA_MAJOR_VERSION>-<OS_DISTRIBUTION_NAME><OS_DISTRIBUTION_VERSION>
Previous versions of this repository built images using the naming convention:
<JAVA_VERSION>[-centos-7]
Where JAVA_VERSION could be many different things (major version, full version, full version with digest...)
Previous tags are still available but are not getting updates anymore
The alfresco-docker-base-java
image can be generated in multiple flavors by mixing OpenJDK versions, distributions and OS.
Either Java 11 or Java 17 can be used to build images using the JAVA_MAJOR
build argument.
Both OpenJDK versions bellow can be built from the JDK or the JRE distribution (using the JDIST build argument)
For legacy Java 11 builds, using the OpenJDK version from the CentOS distro which includes the latest security patches.
For Java 17 builds, using the OpenJDK version from the CentOS distro which includes the latest security patches, this is the recommended option.
The possible combination of OS versions are available:
- centos 7
- rockylinux 8
- alpine 3.15
To build a local version of the base java image follow the instructions below:
docker build -t alfresco-base-java . \
--build-arg DISTRIB_NAME=$DISTRIB_NAME \
--build-arg DISTRIB_MAJOR=$DISTRIB_MAJOR \
--build-arg JAVA_MAJOR=$JAVA_MAJOR \
--build-arg JDIST=$JDIST \
--no-cache --target JAVA_BASE_IMAGE
Push a commit on the default branch including [release]
in the message to trigger a release.
Images built from this repository are more likely to be used as a base image in a Dockerfile.
For reference, see the documentation on layers, the VOLUME instruction and best practices with Volumes.