Skip to content

Conversion of templated dockerfiles from BrightCodeCompany repo - #12

Open
tonygermano wants to merge 5 commits into
mainfrom
tony/templated-dockerfiles
Open

tonygermano wants to merge 5 commits into
mainfrom
tony/templated-dockerfiles

Conversation

@tonygermano

@tonygermano tonygermano commented Oct 15, 2026 •

Copy link
Copy Markdown
Member

Summary

This PR replaces the hand-maintained deploy/ Dockerfile, .env and compose file with the gomplate templates
from BrightCodeCompany/engine-docker (as of 450d8c0).
releases.yaml lists every supported release. render_docker_templates.sh renders a dockerfiles/<version>/
directory for each one, and the build workflow builds and pushes every rendered version as its own matrix job.

It also adds the 4.6.0 images and makes them latest.

Most of the work is Kaur Palang's, from the BCC repo. The commits keep Kaur as the author. The BCC code is
MPL-2.0, so each ported commit message lists the BCC source commits and every change from the BCC version.

Commits

  1. Generate Dockerfiles and compose files from gomplate templates (Kaur Palang)
    • Adds releases.yaml, templates/ (Dockerfile.tpl, compose.yaml.tpl, entrypoint.sh),
      render_docker_templates.sh, and the rendered dockerfiles/4.5.2/.
    • Replaces deploy-image.yaml with build-and-deploy-images.yaml.
    • Labels, the image repository and the issue links point at OIE, not BCC.
    • The <version>-<distro> tag is only on the JRE images. On main today the Alpine JDK service also tags
      itself <version>-alpine-jre, so the JDK push can overwrite the JRE tag. BCC's template had the same
      problem.
    • The render script deletes dockerfiles/ before rendering, so a version removed from releases.yaml doesn't leave stale output. It also copies entrypoint.sh into each version directory.
  2. Add 4.6.0 images and make them latest (Kaur Palang)
    • 4.6.0 is built on eclipse-temurin 21.0.11_10 (Ubuntu resolute and Alpine).
    • The README lists the tags for each version and what each floating tag points to.
  3. Reflow and copy-edit README (Kaur Palang)
    • Wraps paragraphs at about 120 columns and fixes grammar and punctuation.
    • Explains where to file engine issues and where to file Docker image issues.
  4. Build the image matrix from releases.yaml
    • A new list-versions job reads the version slugs from releases.yaml with yq. Adding a release no longer
      means editing the workflow too.
  5. Remove the engine user's inherited groups on Ubuntu
    • On Ubuntu the base image's ubuntu user is renamed to engine. That user was still in adm, sudo,
      dialout and six other groups. usermod -G '' now removes all of them, leaving only the engine group.
      The Alpine images already had no extra groups.

Changes to the published images

Before After
Versions built One, from deploy/.env Every version in releases.yaml (4.5.2 and 4.6.0)
latest tags 4.5.2 4.6.0
4.5.2 base image eclipse-temurin 17.0.15_6 eclipse-temurin 17.0.20.1_1 (still Ubuntu noble and Alpine)
Architectures linux/amd64 linux/amd64 and linux/arm64
Engine user UID/GID 14285 in deploy/Dockerfile UID/GID 1000 (the base image's ubuntu user on Ubuntu)
Ubuntu engine user's groups engine plus the ubuntu user's groups engine only
File ownership Separate chown layer Set in the COPY layer

About the UID: UID/GID 1000 matches every image published to openintegrationengine/engine so far, even
though the deploy/Dockerfile it replaces says 14285. Existing volumes don't need their ownership changed.

Changes to the workflow

  • It runs on pushes to main that change dockerfiles/**, or by hand.
  • It builds and pushes in one step with docker compose build --push.
  • It uses a concurrency group and the dockerhub environment.
  • fail-fast is off, so a failure in one version doesn't cancel another version's job halfway through a push.
  • Actions are updated to their current major versions (checkout@v6, setup-qemu-action@v4,
    setup-buildx-action@v4, setup-compose-action@v2, login-action@v4).
    The dockerhub environment must exist in the repo settings, with the DOCKERHUB_USERNAME variable and the DOCKERHUB_TOKEN secret, before this is merged. Otherwise the first build after the merge fails.

Making changes after this PR

Edit releases.yaml or templates/, then run ./render_docker_templates.sh (needs
gomplate) and commit the rendered dockerfiles/ with the change. Don't edit
dockerfiles/ by hand, because the next render overwrites it.

Follow-ups

These are stacked on this branch and will be opened as separate PRs:

  • tony/ci-tooling: a workflow that checks the rendered dockerfiles/ are up to date, vulnerability report
    generation, and a workflow that updates the Docker Hub description from README.md.
  • oie-4.7.0: the 4.7.0 images, and an update of the 4.6.0 base images to eclipse-temurin 21.0.12.1_1.

🤖 Generated with Claude Code

@tonygermano
tonygermano added this pull request to stack #14 October 15, 2026 14:13
@tonygermano
tonygermano requested review from kpalang and ssrowe October 21, 2026 19:43
kpalang and others added 5 commits October 21, 2026 17:45
Replace the single deploy/ Dockerfile, .env and compose file with gomplate
templates driven by releases.yaml. render_docker_templates.sh renders one
dockerfiles/<version>/ directory per release, and the build workflow builds
and pushes each rendered version as a matrix job.

The other changes in this commit:
- The 4.5.2 images use the eclipse-temurin 17.0.20.1_1 base images (up
  from 17.0.15_6) and are still on Ubuntu noble.
- The downloader stage uses alpine 3.24.1.
- Images are built for linux/amd64 and linux/arm64 (the published images
  are amd64 only).
- File ownership is set in the COPY layer, not with a separate chown layer.
- The engine user is UID/GID 1000. On Ubuntu, the base image's "ubuntu" user
  and group are renamed to "engine". This matches every image published to
  openintegrationengine/engine so far, even though the deploy/Dockerfile
  being replaced used 14285.
- The workflow pushes straight from `docker compose build --push`, runs
  only when dockerfiles/** changes, uses a concurrency group and the
  "dockerhub" environment, and uses newer action versions.

Adapted from BrightCodeCompany/engine-docker@450d8c0 (MPL-2.0).
Source commits: e100278 da28677 ea559ac 5a68694 fcd9f13 7c0d960 bc84ea7
93b1354 eb62f99 3dd65d5 06b80cf 7e9b58e 5e2705f 329f7d1 479262c 4aa12bc
9dc5706 8039bb1 4dc95ef 01c7da5 b06e24e 7f43815 e8b9506 1b64fad 163232b
f8d0138 3bdcb1c 19940d1
(UID/GID 1000 originally from 07d6ff2 on BCC's hotfix/replace-user-ids)
Modifications from the BCC version:
- releases.yaml: OCI authors/vendor labels set to The Open Integration
  Engine Project, and the source label to OpenIntegrationEngine/engine-docker.
  Only 4.5.2 is listed (BCC also has 4.6.0-rc1 and 4.6.0), and latest is
  set to 4.5.2. 4.5.2 base images are
  17.0.20.1_1-{jre,jdk}-{noble,alpine} (BCC: 21.0.11_10, Ubuntu resolute).
  Added a comment explaining that uid/gid must match the Ubuntu base image's
  "ubuntu" user.
- templates/Dockerfile.tpl: a blank line now separates the downloader stage
  from the first final stage in the rendered output.
- templates/compose.yaml.tpl: image repository is openintegrationengine/engine
  (BCC: brightcodecompany/openintegrationengine). The <version>-<distro> tag
  is only on the JRE images (BCC: on both the JRE and JDK images, so the two
  pushes overwrite each other). Services are indented two spaces, with no
  trailing whitespace between them.
- render_docker_templates.sh: added a bash shebang, the MPL-2.0 SPDX license
  identifier and `set -e`. It now copies templates/entrypoint.sh into each
  rendered directory (BCC copied it by hand). It changes to its own
  directory first, and deletes dockerfiles/ before rendering so versions
  removed from releases.yaml do not leave stale output.
- .github/workflows/build-and-deploy-images.yaml: matrix is only 4.5.2.
  fail-fast is off, so a failure in one version's job does not cancel the
  other versions mid-push.
- README.md: only the "Building images" path changed (deploy/ to
  dockerfiles/<version>/).
- .dockerignore: not carried over. Each build context is
  dockerfiles/<version>/, so a root .dockerignore has no effect.
- templates/entrypoint.sh: unchanged (moved from deploy/entrypoint.sh).
- dockerfiles/4.5.2/*: rendered output.

Signed-off-by: Kaur Palang <kaur.palang@brightcodecompany.com>
Co-authored-by: Tony Germano <tony@germano.name>
Signed-off-by: Tony Germano <tony@germano.name>
Add 4.6.0 to releases.yaml and the build matrix, render
dockerfiles/4.6.0/, and move the latest tags from 4.5.2 to 4.6.0. The
README now lists the image tags for each version and the floating tags.

4.6.0 images use the eclipse-temurin 21.0.11_10 base images (Ubuntu
resolute and Alpine).

Adapted from BrightCodeCompany/engine-docker@450d8c0 (MPL-2.0).
Source commits: 5ddaea8 4060f30 bf60b44 450d8c0 c6bfcd7
Modifications from the BCC version:
- releases.yaml: no 4.6.0-rc1 entry.
- .github/workflows/build-and-deploy-images.yaml: matrix is 4.5.2 and 4.6.0
  (BCC also builds 4.6.0-rc1).
- README.md: "Supported Images" section taken from BCC without the
  4.6.0-rc1 entry. Each version's JRE tags also list the <version>-<distro>
  alias (not in BCC).
- dockerfiles/4.6.0/*: rendered output. Same as BCC's except for the OCI
  authors/vendor/source labels, the image repository
  (openintegrationengine/engine instead of
  brightcodecompany/openintegrationengine), and the template changes
  listed in the previous commit (JRE-only <version>-<distro> tag and
  whitespace).

Signed-off-by: Kaur Palang <kaur.palang@brightcodecompany.com>
Co-authored-by: Tony Germano <tony@germano.name>
Signed-off-by: Tony Germano <tony@germano.name>
Wrap paragraphs at about 120 columns and fix grammar and punctuation. Also:
put `-Xmx512m` in code formatting, refer to the "Ubuntu-based" images
instead of "Debian flavored", and explain where engine issues and
Docker image issues should be filed.

Adapted from BrightCodeCompany/engine-docker@450d8c0 (MPL-2.0).
Source commits: 4985e58 b1e6828 e3e8ec2
Modifications from the BCC version:
- README.md: Docker image issues point to the
  OpenIntegrationEngine/engine-docker issue tracker (BCC:
  BrightCodeCompany/engine-docker). Every image reference uses
  openintegrationengine/engine (BCC: brightcodecompany/openintegrationengine).
  The 4.6.0-rc1 tag list is left out.

Signed-off-by: Kaur Palang <kaur.palang@brightcodecompany.com>
Co-authored-by: Tony Germano <tony@germano.name>
Signed-off-by: Tony Germano <tony@germano.name>
The build workflow listed the versions to build by hand, so adding a
release meant editing both releases.yaml and the workflow. A new
list-versions job reads the version slugs from releases.yaml with yq, and
the build-images matrix uses that list.

Signed-off-by: Tony Germano <tony@germano.name>
The Ubuntu images rename the base image's "ubuntu" user to "engine". That
user is also a member of adm, dialout, cdrom, floppy, sudo, audio, dip,
video and plugdev, which the engine does not need. Clear the supplementary
groups with `usermod -G ''`, which leaves engine only in its primary group.

This replaces `usermod -aG engine engine`, which did nothing because engine
is already the primary group. It is a change from the BCC version of
templates/Dockerfile.tpl. The Alpine images already create a user with no
extra groups.

Signed-off-by: Tony Germano <tony@germano.name>
@tonygermano
tonygermano force-pushed the tony/templated-dockerfiles branch from 5cf2f19 to cf0c618 Compare October 22, 2026 03:23
@tonygermano
tonygermano marked this pull request as ready for review October 22, 2026 13:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants