Skip to content

Commit 5eabd19

Browse files
committed
Add alpine and jdk tags
Signed-off-by: Mitch Gaffigan <mitch.gaffigan@comcast.net>
1 parent f176967 commit 5eabd19

File tree

3 files changed

+63
-2
lines changed

3 files changed

+63
-2
lines changed

Dockerfile

Lines changed: 32 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,8 +28,8 @@ WORKDIR /app/server
2828
RUN source "$HOME/.sdkman/bin/sdkman-init.sh" \
2929
&& ANT_OPTS="-Dfile.encoding=UTF8" ant -f mirth-build.xml -DdisableSigning=true
3030

31-
# Stage 2: Runtime container
32-
FROM eclipse-temurin:21.0.7_6-jre-noble
31+
# Stage 2b: JDK runtime container
32+
FROM eclipse-temurin:21.0.7_6-jdk-noble as jdk-run
3333

3434
RUN groupadd mirth \
3535
&& usermod -l mirth ubuntu \
@@ -55,3 +55,33 @@ EXPOSE 8443
5555
USER mirth
5656
ENTRYPOINT [ "/opt/connect/entrypoint.sh" ]
5757
CMD ["/opt/connect/mirth-connect.sh"]
58+
59+
# Stage 2b: JRE runtime container
60+
FROM eclipse-temurin:21.0.7_6-jre-alpine as jre-run
61+
62+
# Alpine does not include bash by default, so we install it
63+
RUN apk add --no-cache bash
64+
# useradd and groupadd are not available in Alpine
65+
RUN addgroup -S mirth \
66+
&& adduser -S -g mirth mirth \
67+
&& mkdir -p /opt/connect/appdata \
68+
&& chown -R mirth:mirth /opt/connect
69+
70+
WORKDIR /opt/connect
71+
COPY --chmod=0755 docker/entrypoint.sh docker/mirth-connect.sh ./
72+
COPY --chown=mirth:mirth --from=builder \
73+
--exclude=cli-lib \
74+
--exclude=mirth-cli-launcher.jar \
75+
--exclude=mccommand \
76+
--exclude=manager-lib \
77+
--exclude=mirth-manager-launcher.jar \
78+
--exclude=mcmanager \
79+
/app/server/setup ./
80+
81+
VOLUME /opt/connect/appdata
82+
VOLUME /opt/connect/custom-extensions
83+
EXPOSE 8443
84+
85+
USER mirth
86+
ENTRYPOINT [ "/opt/connect/entrypoint.sh" ]
87+
CMD ["/opt/connect/mirth-connect.sh"]

docker/README.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,10 @@
2424

2525
##### Eclipse Temurin OpenJDK 21
2626

27+
* [latest-jdk](https://github.com/ghcr.io/mgaffigan/oie-docker/blob/master/Dockerfile)
28+
29+
##### Eclipse Temurin OpenJRE 21 (Alpine)
30+
2731
* [latest](https://github.com/ghcr.io/mgaffigan/oie-docker/blob/master/Dockerfile)
2832

2933
------------

docker/docker-compose.yml

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
# Build and release compose file
2+
# -----------------------------------------------------------------------------
3+
# For production or testing use, see README.md or examples/
4+
name: OIE-release
5+
6+
services:
7+
jre:
8+
image: ${repo}:${tag:-dev}
9+
build:
10+
context: ../
11+
dockerfile: Dockerfile
12+
target: jre-run
13+
x-bake:
14+
platforms:
15+
- linux/amd64
16+
- linux/arm64
17+
18+
jdk:
19+
image: ${repo}:${tag:-dev}-jdk
20+
build:
21+
context: ../
22+
dockerfile: Dockerfile
23+
target: jdk-run
24+
x-bake:
25+
platforms:
26+
- linux/amd64
27+
- linux/arm64

0 commit comments

Comments
 (0)