Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
*
!entrypoint.sh
157 changes: 157 additions & 0 deletions dockerfiles/4.5.2-tp.1/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,157 @@
# syntax=docker/dockerfile:1

################################################################
# #
# WARNING: THIS FILE IS AUTO-GENERATED. DO NOT EDIT MANUALLY #
# #
################################################################

ARG CREATED_AT

FROM alpine:3.21.3 AS downloader

WORKDIR /opt

# Download Open Integration Engine release
RUN apk add --no-cache curl \
&& curl -L \
-o /opt/engine.tar.gz \
-H "Accept: application/vnd.github+json" \
-H "X-GitHub-Api-Version: 2022-11-28" \
https://github.com/OpenIntegrationEngine/engine/releases/download/v4.5.2-tp.1/oie_unix_4_5_2.tar.gz \
&& tar xzf engine.tar.gz \
&& mv /opt/oie /opt/engine \
&& mkdir -p /opt/engine/appdata

WORKDIR /opt/engine
COPY --chmod=755 entrypoint.sh /opt/engine/entrypoint.sh

RUN rm -rf cli-lib manager-lib \
&& rm mirth-cli-launcher.jar oiecommand
FROM eclipse-temurin:17.0.15_6-jre-noble AS ubuntu-jre

ARG CREATED_AT

LABEL \
"org.opencontainers.image.authors"="The Open Integration Engine Project and contributors" \
"org.opencontainers.image.created"="${CREATED_AT?:}" \
"org.opencontainers.image.description"="An open source fork of the now closed-source Mirth Connect" \
"org.opencontainers.image.licenses"="MPL-2.0" \
"org.opencontainers.image.source"="https://github.com/OpenIntegrationEngine/engine-docker" \
"org.opencontainers.image.title"="Open Integration Engine" \
"org.opencontainers.image.url"="https://github.com/OpenIntegrationEngine/engine" \
"org.opencontainers.image.vendor"="The Open Integration Engine Project" \
"org.opencontainers.image.version"="4.5.2-tp.1"

COPY --from=downloader --chown=1000:1000 /opt/engine /opt/engine

RUN apt-get update \
&& apt-get install -y unzip \
&& rm -rf /var/lib/apt/lists/* \
&& groupmod --new-name engine ubuntu \
&& usermod -l engine ubuntu \
&& usermod -aG engine engine

VOLUME /opt/engine/appdata
VOLUME /opt/engine/custom-extensions

WORKDIR /opt/engine
EXPOSE 8443
USER engine

ENTRYPOINT ["./entrypoint.sh"]
CMD ["./oieserver"]

FROM eclipse-temurin:17.0.15_6-jdk-noble AS ubuntu-jdk

ARG CREATED_AT

LABEL \
"org.opencontainers.image.authors"="The Open Integration Engine Project and contributors" \
"org.opencontainers.image.created"="${CREATED_AT?:}" \
"org.opencontainers.image.description"="An open source fork of the now closed-source Mirth Connect" \
"org.opencontainers.image.licenses"="MPL-2.0" \
"org.opencontainers.image.source"="https://github.com/OpenIntegrationEngine/engine-docker" \
"org.opencontainers.image.title"="Open Integration Engine" \
"org.opencontainers.image.url"="https://github.com/OpenIntegrationEngine/engine" \
"org.opencontainers.image.vendor"="The Open Integration Engine Project" \
"org.opencontainers.image.version"="4.5.2-tp.1"

COPY --from=downloader --chown=1000:1000 /opt/engine /opt/engine

RUN apt-get update \
&& apt-get install -y unzip \
&& rm -rf /var/lib/apt/lists/* \
&& groupmod --new-name engine ubuntu \
&& usermod -l engine ubuntu \
&& usermod -aG engine engine

VOLUME /opt/engine/appdata
VOLUME /opt/engine/custom-extensions

WORKDIR /opt/engine
EXPOSE 8443
USER engine

ENTRYPOINT ["./entrypoint.sh"]
CMD ["./oieserver"]

FROM eclipse-temurin:17.0.15_6-jre-alpine AS alpine-jre

ARG CREATED_AT

LABEL \
"org.opencontainers.image.authors"="The Open Integration Engine Project and contributors" \
"org.opencontainers.image.created"="${CREATED_AT?:}" \
"org.opencontainers.image.description"="An open source fork of the now closed-source Mirth Connect" \
"org.opencontainers.image.licenses"="MPL-2.0" \
"org.opencontainers.image.source"="https://github.com/OpenIntegrationEngine/engine-docker" \
"org.opencontainers.image.title"="Open Integration Engine" \
"org.opencontainers.image.url"="https://github.com/OpenIntegrationEngine/engine" \
"org.opencontainers.image.vendor"="The Open Integration Engine Project" \
"org.opencontainers.image.version"="4.5.2-tp.1"

COPY --from=downloader --chown=1000:1000 /opt/engine /opt/engine

RUN apk add --no-cache bash unzip \
&& adduser -D -H -u 1000 engine engine

VOLUME /opt/engine/appdata
VOLUME /opt/engine/custom-extensions

WORKDIR /opt/engine
EXPOSE 8443
USER engine

ENTRYPOINT ["./entrypoint.sh"]
CMD ["./oieserver"]

FROM eclipse-temurin:17.0.15_6-jdk-alpine AS alpine-jdk

ARG CREATED_AT

LABEL \
"org.opencontainers.image.authors"="The Open Integration Engine Project and contributors" \
"org.opencontainers.image.created"="${CREATED_AT?:}" \
"org.opencontainers.image.description"="An open source fork of the now closed-source Mirth Connect" \
"org.opencontainers.image.licenses"="MPL-2.0" \
"org.opencontainers.image.source"="https://github.com/OpenIntegrationEngine/engine-docker" \
"org.opencontainers.image.title"="Open Integration Engine" \
"org.opencontainers.image.url"="https://github.com/OpenIntegrationEngine/engine" \
"org.opencontainers.image.vendor"="The Open Integration Engine Project" \
"org.opencontainers.image.version"="4.5.2-tp.1"

COPY --from=downloader --chown=1000:1000 /opt/engine /opt/engine

RUN apk add --no-cache bash unzip \
&& adduser -D -H -u 1000 engine engine

VOLUME /opt/engine/appdata
VOLUME /opt/engine/custom-extensions

WORKDIR /opt/engine
EXPOSE 8443
USER engine

ENTRYPOINT ["./entrypoint.sh"]
CMD ["./oieserver"]
68 changes: 68 additions & 0 deletions dockerfiles/4.5.2-tp.1/compose.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,68 @@
################################################################
# #
# WARNING: THIS FILE IS AUTO-GENERATED. DO NOT EDIT MANUALLY #
# #
################################################################

name: open-integration-engine

services:
ubuntu-jre:
image: openintegrationengine/engine
build:
dockerfile: dockerfiles/4.5.2-tp.1/Dockerfile
target: ubuntu-jre
context: ../../
platforms:
- linux/amd64
# - linux/arm64
tags:
- openintegrationengine/engine:4.5.2-tp.1-ubuntu
- openintegrationengine/engine:4.5.2-tp.1-ubuntu-jre
- openintegrationengine/engine:latest-ubuntu-jre
- openintegrationengine/engine:latest-ubuntu

ubuntu-jdk:
image: openintegrationengine/engine
build:
dockerfile: dockerfiles/4.5.2-tp.1/Dockerfile
target: ubuntu-jdk
context: ../../
platforms:
- linux/amd64
# - linux/arm64
tags:
- openintegrationengine/engine:4.5.2-tp.1-ubuntu
- openintegrationengine/engine:4.5.2-tp.1-ubuntu-jdk
- openintegrationengine/engine:latest-ubuntu-jdk

alpine-jre:
image: openintegrationengine/engine
build:
dockerfile: dockerfiles/4.5.2-tp.1/Dockerfile
target: alpine-jre
context: ../../
platforms:
- linux/amd64
# - linux/arm64
tags:
- openintegrationengine/engine:4.5.2-tp.1-alpine
- openintegrationengine/engine:4.5.2-tp.1-alpine-jre
- openintegrationengine/engine:latest-alpine-jre
- openintegrationengine/engine:latest-alpine
- openintegrationengine/engine:latest

alpine-jdk:
image: openintegrationengine/engine
build:
dockerfile: dockerfiles/4.5.2-tp.1/Dockerfile
target: alpine-jdk
context: ../../
platforms:
- linux/amd64
# - linux/arm64
tags:
- openintegrationengine/engine:4.5.2-tp.1-alpine
- openintegrationengine/engine:4.5.2-tp.1-alpine-jdk
- openintegrationengine/engine:latest-alpine-jdk

File renamed without changes.
38 changes: 38 additions & 0 deletions releases.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
# Specifies which slug should gain the "latest" tags
latest: 4.5.2-tp.1

# Sets the alpine image tag for the downloader stage
downloaderTag: 3.21.3

uid: 1000
gid: 1000

# Add OCI best-practice labels https://github.com/opencontainers/image-spec/blob/main/annotations.md#pre-defined-annotation-keys
labels: |-
"org.opencontainers.image.authors"="The Open Integration Engine Project and contributors" \
"org.opencontainers.image.created"="${CREATED_AT?:}" \
"org.opencontainers.image.description"="An open source fork of the now closed-source Mirth Connect" \
"org.opencontainers.image.licenses"="MPL-2.0" \
"org.opencontainers.image.source"="https://github.com/OpenIntegrationEngine/engine-docker" \
"org.opencontainers.image.title"="Open Integration Engine" \
"org.opencontainers.image.url"="https://github.com/OpenIntegrationEngine/engine" \
"org.opencontainers.image.vendor"="The Open Integration Engine Project" \
"org.opencontainers.image.version"="{{ .slug }}"

versions:
- slug: 4.5.2-tp.1
releaseVersion: 4.5.2
releaseUrl: https://github.com/OpenIntegrationEngine/engine/releases/download/v4.5.2-tp.1/oie_unix_4_5_2.tar.gz
tags:
- distro: ubuntu
type: jre
tag: 17.0.15_6-jre-noble
- distro: ubuntu
type: jdk
tag: 17.0.15_6-jdk-noble
- distro: alpine
type: jre
tag: 17.0.15_6-jre-alpine
- distro: alpine
type: jdk
tag: 17.0.15_6-jdk-alpine
5 changes: 5 additions & 0 deletions render_docker_images.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# Render Dockerfiles
gomplate -V -c .=releases.yaml -f templates/Dockerfile.tpl

# Render compose files
gomplate -V -c .=releases.yaml -f templates/compose.yaml.tpl
83 changes: 83 additions & 0 deletions templates/Dockerfile.tpl
Original file line number Diff line number Diff line change
@@ -0,0 +1,83 @@
{{/* Collect all root elements except "versions" into a variable */}}
{{- $config := coll.Omit "versions" . -}}

{{/* Create gomplate specific iteration over versions array */}}
{{- range $version := .versions -}}
{{- $ctx := dict "config" $config "version" $version }}

{{/* Define paths to render the Dockerfiles to */}}
{{- $outPath := printf "dockerfiles/%s/Dockerfile" $version.slug }}

{{/* Render the inline template defined below */}}
{{- tmpl.Exec "dockerfile" $ctx | file.Write $outPath }}
{{- end -}}

{{- define "dockerfile" -}}
# syntax=docker/dockerfile:1

################################################################
# #
# WARNING: THIS FILE IS AUTO-GENERATED. DO NOT EDIT MANUALLY #
# #
################################################################

ARG CREATED_AT

FROM alpine:{{ .config.downloaderTag }} AS downloader

WORKDIR /opt

# Download Open Integration Engine release
RUN apk add --no-cache curl \
&& curl -L \
-o /opt/engine.tar.gz \
-H "Accept: application/vnd.github+json" \
-H "X-GitHub-Api-Version: 2022-11-28" \
{{ .version.releaseUrl }} \
&& tar xzf engine.tar.gz \
&& mv /opt/oie /opt/engine \
&& mkdir -p /opt/engine/appdata

WORKDIR /opt/engine
COPY --chmod=755 entrypoint.sh /opt/engine/entrypoint.sh

RUN rm -rf cli-lib manager-lib \
&& rm mirth-cli-launcher.jar oiecommand

{{- /* Assign current version slug into a variable to carry it into the tags iteration */}}
{{- $slug := dict "slug" .version.slug -}}
{{/* Iterate version tags to generate the final stages */}}
{{- range .version.tags }}
FROM eclipse-temurin:{{ .tag }} AS {{ print .distro "-" .type }}

ARG CREATED_AT

LABEL \
{{/* Render the Labels section to include the slug */}}
{{- tpl $.config.labels $slug | strings.Indent 2 }}

COPY --from=downloader --chown={{ $.config.uid }}:{{ $.config.gid }} /opt/engine /opt/engine
{{ if eq .distro "ubuntu" }}
RUN apt-get update \
&& apt-get install -y unzip \
&& rm -rf /var/lib/apt/lists/* \
&& groupmod --new-name engine ubuntu \
&& usermod -l engine ubuntu \
&& usermod -aG engine engine
{{- else if eq .distro "alpine" }}
RUN apk add --no-cache bash unzip \
&& adduser -D -H -u {{ $.config.uid }} engine engine
{{- end }}

VOLUME /opt/engine/appdata
VOLUME /opt/engine/custom-extensions

WORKDIR /opt/engine
EXPOSE 8443
USER engine

ENTRYPOINT ["./entrypoint.sh"]
CMD ["./oieserver"]
{{ end -}}

{{ end }}
Loading