Docker images for Trino integration testing
52
stars
641
commits
Dockerfile
primary language
Aug 25, 2026
updated
The docker images in this repository are expected to be given names of the form testing/hdp3.1-hive. The Dockerfile and other files needed to build the testing/hdp3.1-hive image are located in the directory testing/hdp3.1-hive.
Generally speaking, the images should not be built manually with docker build.
The docker images should be built using make. To build the docker image named
testing/hdp3.1-hive, run make testing/hdp3.1-hive. Make will build
the image and its dependencies in the correct order.
If you want to build a base image and all the images depending on it,
you can use the *.dependants targets. E.g.
make testing/hdp3.1-base.dependants
will build the hdp3.1-base and all the images depending on it (transitively).
To release a new version of the images, run the release GitHub Actions (GHA) Workflow.
The workflow requires the version file to contain a SNAPSHOT version (e.g., 124-SNAPSHOT)
and will fail otherwise.
It will:
-SNAPSHOT suffix from the version file and commit to master.-SNAPSHOT suffix, and commit to master.All of the docker images in the repository share the same version number. This is because most of the images depend on a parent image that is also in the repository (e.g. testing/hdp3.1-hive is FROM testing/hdp3.1-base), or are meant to be used together in testing (testing/hdp3.1-hive and testing/hdp3.1-hive-kerberized).
Having all of the images on the same version number make troubleshooting easy: If all of the docker images you are using have the same version number then they are in a consistent state.
This means that we treat the repository as a single codebase that creates multiple artifacts (Docker images) that all need to be released together.
Note: manual releases are not recommended. Use the GHA Workflow instead.
To test the release workflow without affecting the official repository:
release workflow in your fork with:
registry: ghcr.io/YOUR_USERNAME - Pushes images to your personal registryThis will perform a full release in your fork, including git commits, tags, and Docker image pushes. After testing, you may want to manually clean up:
If you must publish a new version manually, follow these steps:
To release a snapshot version of the repository do the following
docker loginversion file that the value is set to something ending in -SNAPSHOT.make snapshotTo release a release (final) version of the repository do the following
docker loginversion file that the value is set to something not ending in -SNAPSHOT.make releaseTo release a snapshot or final version, you must log in to docker using the
docker login command.
Normally developers are working on a snapshot version of the next release, and
the value in the version file should be set to a snapshot version such as
35-SNAPSHOT. A typical workflow is as follows:
make snapshot to push snapshot releases to dockerhub as neededEventually, version 35-SNAPSHOT is ready for release. To release version 35, do the following:
VERSION to the release version: 35-SNAPSHOT -> 35make release to push the images to dockerhubVERSION to the next snapshot version: 35 -> 36-SNAPSHOTmake snapshot does the following:
make release does the following:
version fileSeveral rules are enforced about the state of the repository when pushing to dockerhub:
For a project that uses Travis for continuous integration, you can upgrade the docker images used by the project using the following process.
make snapshot to release a snapshot build to dockerhub.make releaseDocker build arguments are documented in the Dockerfile reference
Args are used by specifying the ARG directive in a Dockerfile:
ARG FOO
RUN echo $FOO >/etc/foo
The value of FOO then needs to be set in the Makefile:
FOO := Docker images build on $(shell uname -s) are superior to all others.
Note that docker build does not allow the variable reference $FOO to be
written ${FOO} or $(FOO). Further note that it won't warn you about this;
instead, you'll likely end up with an error later in the build or a broken
image.
docker build won't let you pass --build-args that don't have a
corresponding key in the Dockerfile. This means that the build system can't
just pass the union of all of the --build-args needed by every Dockerfile in
the repository. The build system handles this largely the same way it handles
figuring out what the correct dependency order is for building the images,
described below.
At a high level, a docker image depends on two things:
Using the relative directory from the root of the repo as the image name, we could, in principle, write a rule of the form
testing/foo: testing/foo/Dockerfile $(extract_parent testing/foo/Dockerfile)
cd testing/foo && docker build -t testing/foo .
Using automatic variables we could shorten that to the following:
testing/foo: $@/Dockerfile $(extract_parent $@/Dockerfile)
cd $@ && docker build -t $@ .
This is conceptually valid, but it doesn't work: Automatic variables aren't available in the prerequisites. The solution to solve that is to use a pattern rule:
$(images): %: %/Dockerfile $(extract_parent %/Dockerfile)
...
That almost works. Almost because you can't use the stem (%) in a function call.
Instead, we can use three features of make together to accomplish the same thing.
testing/foo: testing/foo_parent
testing/foo: testing/foo/Dockerfile
...
The strategy is to include a separate file that specifies the dependency on the parent image. This file isn't in the repo, so the Makefile has a rule to make it from the image's Dockerfile. The second rule specifies the dependency on the Dockerfile and builds the image using docker build.
Recursive Make Considered Harmful explains this technique in section 5.4 and applies it to C source files and the .h files they include. I've adapted it here.
The bin/depend.sh script generates a .d file in $(DEPDIR) from the Dockerfile for
the image:
$(DEPDIR)/testing/foo.d: testing/foo/Dockerfile
...
The corresponding .d file will take one of two forms:
if foo's parent is built from this repository
testing/foo: testing/foo_parent
if foo's parent should be pulled from dockerhub
testing/foo:
In the first case, make now knows that foo_parent is a dependency of foo, and builds it first.
In the second case, we don't add a dependency for make, and docker itself is responsible for pulling foo's parent from dockerhub as part of the docker build process.
A major difference between the approach explained in Recursive Make
Considered Harmful is that bin/depend.sh needs to know what images the repo knows
how to build so it can output the second form for parent images we don't
know how to build. We do this by passing in the names of all of the images we
know how to build.
(top 30 of 42)
Dockerfile
55.8%
Shell
33.8%
Makefile
7.8%
XSLT
2.6%
Docker images for Trino integration testing
52
stars
641
commits
Dockerfile
primary language
Aug 25, 2026
updated
The docker images in this repository are expected to be given names of the form testing/hdp3.1-hive. The Dockerfile and other files needed to build the testing/hdp3.1-hive image are located in the directory testing/hdp3.1-hive.
Generally speaking, the images should not be built manually with docker build.
The docker images should be built using make. To build the docker image named
testing/hdp3.1-hive, run make testing/hdp3.1-hive. Make will build
the image and its dependencies in the correct order.
If you want to build a base image and all the images depending on it,
you can use the *.dependants targets. E.g.
make testing/hdp3.1-base.dependants
will build the hdp3.1-base and all the images depending on it (transitively).
To release a new version of the images, run the release GitHub Actions (GHA) Workflow.
The workflow requires the version file to contain a SNAPSHOT version (e.g., 124-SNAPSHOT)
and will fail otherwise.
It will:
-SNAPSHOT suffix from the version file and commit to master.-SNAPSHOT suffix, and commit to master.All of the docker images in the repository share the same version number. This is because most of the images depend on a parent image that is also in the repository (e.g. testing/hdp3.1-hive is FROM testing/hdp3.1-base), or are meant to be used together in testing (testing/hdp3.1-hive and testing/hdp3.1-hive-kerberized).
Having all of the images on the same version number make troubleshooting easy: If all of the docker images you are using have the same version number then they are in a consistent state.
This means that we treat the repository as a single codebase that creates multiple artifacts (Docker images) that all need to be released together.
Note: manual releases are not recommended. Use the GHA Workflow instead.
To test the release workflow without affecting the official repository:
release workflow in your fork with:
registry: ghcr.io/YOUR_USERNAME - Pushes images to your personal registryThis will perform a full release in your fork, including git commits, tags, and Docker image pushes. After testing, you may want to manually clean up:
If you must publish a new version manually, follow these steps:
To release a snapshot version of the repository do the following
docker loginversion file that the value is set to something ending in -SNAPSHOT.make snapshotTo release a release (final) version of the repository do the following
docker loginversion file that the value is set to something not ending in -SNAPSHOT.make releaseTo release a snapshot or final version, you must log in to docker using the
docker login command.
Normally developers are working on a snapshot version of the next release, and
the value in the version file should be set to a snapshot version such as
35-SNAPSHOT. A typical workflow is as follows:
make snapshot to push snapshot releases to dockerhub as neededEventually, version 35-SNAPSHOT is ready for release. To release version 35, do the following:
VERSION to the release version: 35-SNAPSHOT -> 35make release to push the images to dockerhubVERSION to the next snapshot version: 35 -> 36-SNAPSHOTmake snapshot does the following:
make release does the following:
version fileSeveral rules are enforced about the state of the repository when pushing to dockerhub:
For a project that uses Travis for continuous integration, you can upgrade the docker images used by the project using the following process.
make snapshot to release a snapshot build to dockerhub.make releaseDocker build arguments are documented in the Dockerfile reference
Args are used by specifying the ARG directive in a Dockerfile:
ARG FOO
RUN echo $FOO >/etc/foo
The value of FOO then needs to be set in the Makefile:
FOO := Docker images build on $(shell uname -s) are superior to all others.
Note that docker build does not allow the variable reference $FOO to be
written ${FOO} or $(FOO). Further note that it won't warn you about this;
instead, you'll likely end up with an error later in the build or a broken
image.
docker build won't let you pass --build-args that don't have a
corresponding key in the Dockerfile. This means that the build system can't
just pass the union of all of the --build-args needed by every Dockerfile in
the repository. The build system handles this largely the same way it handles
figuring out what the correct dependency order is for building the images,
described below.
At a high level, a docker image depends on two things:
Using the relative directory from the root of the repo as the image name, we could, in principle, write a rule of the form
testing/foo: testing/foo/Dockerfile $(extract_parent testing/foo/Dockerfile)
cd testing/foo && docker build -t testing/foo .
Using automatic variables we could shorten that to the following:
testing/foo: $@/Dockerfile $(extract_parent $@/Dockerfile)
cd $@ && docker build -t $@ .
This is conceptually valid, but it doesn't work: Automatic variables aren't available in the prerequisites. The solution to solve that is to use a pattern rule:
$(images): %: %/Dockerfile $(extract_parent %/Dockerfile)
...
That almost works. Almost because you can't use the stem (%) in a function call.
Instead, we can use three features of make together to accomplish the same thing.
testing/foo: testing/foo_parent
testing/foo: testing/foo/Dockerfile
...
The strategy is to include a separate file that specifies the dependency on the parent image. This file isn't in the repo, so the Makefile has a rule to make it from the image's Dockerfile. The second rule specifies the dependency on the Dockerfile and builds the image using docker build.
Recursive Make Considered Harmful explains this technique in section 5.4 and applies it to C source files and the .h files they include. I've adapted it here.
The bin/depend.sh script generates a .d file in $(DEPDIR) from the Dockerfile for
the image:
$(DEPDIR)/testing/foo.d: testing/foo/Dockerfile
...
The corresponding .d file will take one of two forms:
if foo's parent is built from this repository
testing/foo: testing/foo_parent
if foo's parent should be pulled from dockerhub
testing/foo:
In the first case, make now knows that foo_parent is a dependency of foo, and builds it first.
In the second case, we don't add a dependency for make, and docker itself is responsible for pulling foo's parent from dockerhub as part of the docker build process.
A major difference between the approach explained in Recursive Make
Considered Harmful is that bin/depend.sh needs to know what images the repo knows
how to build so it can output the second form for parent images we don't
know how to build. We do this by passing in the names of all of the images we
know how to build.
(top 30 of 42)
Dockerfile
55.8%
Shell
33.8%
Makefile
7.8%
XSLT
2.6%