forked from brandonstevens/mirth-connect-docker
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfile
53 lines (44 loc) · 1.73 KB
/
Dockerfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
FROM java
ARG MIRTH_CONNECT_VERSION=3.5.1.b194
# Mirth Connect is run with user `connect`, uid = 1000
# If you bind mount a volume from the host or a data container,
# ensure you use the same uid
RUN useradd -u 1000 mirth
VOLUME /opt/mirth-connect/appdata
# grab gosu for easy step-down from root
ENV GOSU_VERSION 1.10
# download and install gosu
RUN set -ex; \
\
fetchDeps=' \
ca-certificates \
wget \
'; \
apt-get -qq update; \
apt-get -qq install -y --no-install-recommends $fetchDeps; \
rm -rf /var/lib/apt/lists/*; \
\
dpkgArch="$(dpkg --print-architecture | awk -F- '{ print $NF }')"; \
wget --quiet -O /usr/local/bin/gosu "https://github.com/tianon/gosu/releases/download/$GOSU_VERSION/gosu-$dpkgArch"; \
wget --quiet -O /usr/local/bin/gosu.asc "https://github.com/tianon/gosu/releases/download/$GOSU_VERSION/gosu-$dpkgArch.asc"; \
\
export GNUPGHOME="$(mktemp -d)"; \
gpg -q --keyserver ha.pool.sks-keyservers.net --recv-keys B42F6819007F00F88E364FD4036A9C25BF357DD4; \
gpg -q --batch --verify /usr/local/bin/gosu.asc /usr/local/bin/gosu; \
rm -r "$GNUPGHOME" /usr/local/bin/gosu.asc; \
\
chmod +x /usr/local/bin/gosu; \
gosu nobody true;
# download and install mirth connect
RUN set -ex; \
cd /tmp && \
wget --quiet http://downloads.mirthcorp.com/connect/$MIRTH_CONNECT_VERSION/mirthconnect-$MIRTH_CONNECT_VERSION-unix.tar.gz && \
tar xzf mirthconnect-$MIRTH_CONNECT_VERSION-unix.tar.gz && \
rm -f mirthconnect-$MIRTH_CONNECT_VERSION-unix.tar.gz && \
mv Mirth\ Connect/* /opt/mirth-connect/ && \
chown -R mirth /opt/mirth-connect;
WORKDIR /opt/mirth-connect
EXPOSE 8080 8443
COPY docker-entrypoint.sh /
ENTRYPOINT ["/docker-entrypoint.sh"]
CMD ["java", "-jar", "mirth-server-launcher.jar"]