Skip to content

Commit 3e64bd9

Browse files
committed
Set up Dockerfile and surrounding tools
Signed-off-by: Kaur Palang <[email protected]>
1 parent 0d04da4 commit 3e64bd9

File tree

6 files changed

+455
-0
lines changed

6 files changed

+455
-0
lines changed
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
on:
2+
workflow_dispatch:
3+
4+
jobs:
5+
build-images:
6+
runs-on: ubuntu-latest
7+
steps:
8+
- name: Checkout
9+
uses: actions/checkout@v4
10+
11+
- name: Set up QEMU
12+
uses: docker/setup-qemu-action@v3
13+
14+
- name: Set up Docker Buildx
15+
uses: docker/setup-buildx-action@v3
16+
17+
- name: Set up Docker Compose
18+
uses: docker/setup-compose-action@v1
19+
20+
- name: Build images
21+
run: |
22+
docker compose build --build-arg CREATED_AT=$(date -u +"%Y-%m-%dT%H:%M:%SZ")

deploy/.dockerignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
.env
2+
!entrypoint.sh

deploy/.env

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
UBUNTU_JRE_TAG=17.0.15_6-jre-noble
2+
UBUNTU_JDK_TAG=17.0.15_6-jdk-noble
3+
4+
ALPINE_JRE_TAG=17.0.15_6-jre-alpine
5+
ALPINE_JDK_TAG=17.0.15_6-jdk-alpine
6+
7+
OIE_RELEASE_VERSION=4.5.2-tp.1
8+
OIE_RELEASE_URL=https://github.com/OpenIntegrationEngine/engine/releases/download/v4.5.2-tp.1/oie_unix_4_5_2.tar.gz

deploy/Dockerfile

Lines changed: 114 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,114 @@
1+
# syntax=docker/dockerfile:1
2+
3+
ARG ALPINE_TAG
4+
ARG UBUNTU_TAG
5+
6+
ARG OIE_RELEASE_VERSION
7+
8+
ARG UID=14285
9+
ARG GID=14285
10+
11+
FROM alpine:3.21.3 AS downloader
12+
13+
ARG UID
14+
ARG GID
15+
ARG OIE_RELEASE_URL
16+
17+
WORKDIR /opt
18+
19+
# Download Open Integration Engine release
20+
RUN apk add --no-cache curl \
21+
&& curl -L \
22+
-o /opt/engine.tar.gz \
23+
-H "Accept: application/vnd.github+json" \
24+
-H "X-GitHub-Api-Version: 2022-11-28" \
25+
${OIE_RELEASE_URL}\
26+
&& tar xzf engine.tar.gz \
27+
&& mv /opt/oie /opt/engine \
28+
&& mkdir -p /opt/engine/appdata
29+
30+
WORKDIR /opt/engine
31+
COPY --chmod=755 entrypoint.sh /opt/engine/entrypoint.sh
32+
33+
RUN rm -rf cli-lib manager-lib \
34+
&& rm mirth-cli-launcher.jar oiecommand
35+
36+
RUN chown -R ${UID}:${GID} /opt/engine
37+
38+
##########################################
39+
#
40+
# Alpine Images
41+
#
42+
##########################################
43+
44+
FROM eclipse-temurin:$ALPINE_TAG AS alpine
45+
46+
ARG UID
47+
ARG GID
48+
ARG OIE_RELEASE_VERSION
49+
ARG CREATED_AT
50+
51+
# Add OCI best-practice labels https://github.com/opencontainers/image-spec/blob/main/annotations.md#pre-defined-annotation-keys
52+
LABEL "org.opencontainers.image.authors"="Open Integration Engine" \
53+
"org.opencontainers.image.created"="${CREATED_AT?:}" \
54+
"org.opencontainers.image.description"="An open source fork of the now closed-source Mirth Connect" \
55+
"org.opencontainers.image.licenses"="MPL-2.0" \
56+
"org.opencontainers.image.source"="https://github.com/OpenIntegrationEngine/engine-docker" \
57+
"org.opencontainers.image.title"="Open Integration Engine" \
58+
"org.opencontainers.image.url"="https://github.com/OpenIntegrationEngine/engine" \
59+
"org.opencontainers.image.vendor"="Open Integration Engine" \
60+
"org.opencontainers.image.version"="${OIE_RELEASE_VERSION?:}"
61+
62+
COPY --from=downloader /opt/engine /opt/engine
63+
64+
RUN apk add --no-cache bash \
65+
&& adduser -D -H -u $UID engine engine # Create both group and user "engine" at the same time
66+
67+
VOLUME /opt/engine/appdata
68+
VOLUME /opt/engine/custom-extensions
69+
WORKDIR /opt/engine
70+
71+
EXPOSE 8443
72+
73+
USER engine
74+
ENTRYPOINT ["./entrypoint.sh"]
75+
CMD ["./oieserver"]
76+
77+
##########################################
78+
#
79+
# Ubuntu Image
80+
#
81+
##########################################
82+
83+
FROM eclipse-temurin:$UBUNTU_TAG AS ubuntu
84+
85+
ARG UID
86+
ARG GID
87+
ARG OIE_RELEASE_VERSION
88+
ARG CREATED_AT
89+
90+
# Add OCI best-practice labels https://github.com/opencontainers/image-spec/blob/main/annotations.md#pre-defined-annotation-keys
91+
LABEL "org.opencontainers.image.authors"="Open Integration Engine" \
92+
"org.opencontainers.image.created"="${CREATED_AT?:}" \
93+
"org.opencontainers.image.description"="An open source fork of the now closed-source Mirth Connect" \
94+
"org.opencontainers.image.licenses"="MPL-2.0" \
95+
"org.opencontainers.image.source"="https://github.com/OpenIntegrationEngine/engine-docker" \
96+
"org.opencontainers.image.title"="Open Integration Engine" \
97+
"org.opencontainers.image.url"="https://github.com/OpenIntegrationEngine/engine" \
98+
"org.opencontainers.image.vendor"="Open Integration Engine" \
99+
"org.opencontainers.image.version"="${OIE_RELEASE_VERSION?:}"
100+
101+
COPY --from=downloader /opt/engine /opt/engine
102+
103+
RUN groupadd --gid ${GID} engine \
104+
&& useradd -u ${UID} -g ${GID} -M engine
105+
106+
VOLUME /opt/engine/appdata
107+
VOLUME /opt/engine/custom-extensions
108+
WORKDIR /opt/engine
109+
110+
EXPOSE 8443
111+
112+
USER engine
113+
ENTRYPOINT ["./entrypoint.sh"]
114+
CMD ["./oieserver"]

deploy/compose.yaml

Lines changed: 64 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,64 @@
1+
name: open-integration-engine
2+
3+
services:
4+
ubuntu-jdk:
5+
image: openintegrationengine/engine
6+
build:
7+
dockerfile: Dockerfile
8+
target: ubuntu
9+
context: .
10+
args: &jdk-args
11+
UBUNTU_TAG: ${UBUNTU_JDK_TAG:?}
12+
ALPINE_TAG: ${ALPINE_JDK_TAG:?}
13+
OIE_RELEASE_VERSION: ${OIE_RELEASE_VERSION:?}
14+
OIE_RELEASE_URL: ${OIE_RELEASE_URL:?}
15+
platforms: &platforms
16+
- linux/amd64
17+
- linux/arm64
18+
tags:
19+
- openintegrationengine/engine:latest-ubuntu-jdk
20+
- openintegrationengine/engine:${OIE_RELEASE_VERSION?:}-ubuntu-jdk
21+
22+
ubuntu-jre:
23+
image: openintegrationengine/engine
24+
build:
25+
dockerfile: Dockerfile
26+
target: ubuntu
27+
context: .
28+
args: &jre-tags
29+
UBUNTU_TAG: ${UBUNTU_JRE_TAG:?}
30+
ALPINE_TAG: ${ALPINE_JRE_TAG:?}
31+
OIE_RELEASE_VERSION: ${OIE_RELEASE_VERSION:?}
32+
OIE_RELEASE_URL: ${OIE_RELEASE_URL:?}
33+
platforms: *platforms
34+
tags:
35+
- openintegrationengine/engine:latest-ubuntu
36+
- openintegrationengine/engine:latest-ubuntu-jre
37+
- openintegrationengine/engine:${OIE_RELEASE_VERSION?:}-ubuntu
38+
- openintegrationengine/engine:${OIE_RELEASE_VERSION?:}-ubuntu-jre
39+
40+
alpine-jdk:
41+
image: openintegrationengine/engine
42+
build:
43+
dockerfile: Dockerfile
44+
target: alpine
45+
context: .
46+
args: *jdk-args
47+
platforms: *platforms
48+
tags:
49+
- openintegrationengine/engine:latest-alpine-jdk
50+
51+
alpine-jre:
52+
image: openintegrationengine/engine
53+
build:
54+
dockerfile: Dockerfile
55+
target: alpine
56+
context: .
57+
args: *jre-tags
58+
platforms: *platforms
59+
tags:
60+
- openintegrationengine/engine:latest
61+
- openintegrationengine/engine:latest-alpine
62+
- openintegrationengine/engine:latest-alpine-jre
63+
- openintegrationengine/engine:${OIE_RELEASE_VERSION?:}-alpine
64+
- openintegrationengine/engine:${OIE_RELEASE_VERSION?:}-alpine-jre

0 commit comments

Comments
 (0)