-
Notifications
You must be signed in to change notification settings - Fork 4
Expand file tree
/
Copy pathDockerfile
More file actions
36 lines (30 loc) · 1.45 KB
/
Dockerfile
File metadata and controls
36 lines (30 loc) · 1.45 KB
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
# Dockerfile for running CTP DicomAnonymizerTool with required dependencies
FROM eclipse-temurin:17-jdk AS build
ENV ANT_VERSION=1.10.15
ENV ANT_HOME=/opt/ant
# change to tmp folder
WORKDIR /tmp
# Download and extract apache ant to opt folder
RUN wget --no-check-certificate --no-cookies http://archive.apache.org/dist/ant/binaries/apache-ant-${ANT_VERSION}-bin.tar.gz \
&& wget --no-check-certificate --no-cookies http://archive.apache.org/dist/ant/binaries/apache-ant-${ANT_VERSION}-bin.tar.gz.sha512 \
&& echo "$(cat apache-ant-${ANT_VERSION}-bin.tar.gz.sha512) apache-ant-${ANT_VERSION}-bin.tar.gz" | sha512sum -c \
&& tar -zvxf apache-ant-${ANT_VERSION}-bin.tar.gz -C /opt/ \
&& ln -s /opt/apache-ant-${ANT_VERSION} /opt/ant \
&& rm -f apache-ant-${ANT_VERSION}-bin.tar.gz \
&& rm -f apache-ant-${ANT_VERSION}-bin.tar.gz.sha512
# add executables to path
RUN update-alternatives --install "/usr/bin/ant" "ant" "/opt/ant/bin/ant" 1 && \
update-alternatives --set "ant" "/opt/ant/bin/ant"
# Build CTP & DicomAnonymizerTool
COPY CTP/ /build/CTP/
COPY DicomAnonymizerTool/ /build/DicomAnonymizerTool/
WORKDIR /build/CTP
RUN ant
WORKDIR /build/DicomAnonymizerTool
RUN ant
# Install
FROM eclipse-temurin:17 AS dat
COPY --from=build /build/DicomAnonymizerTool/build/DicomAnonymizerTool/ /opt/DAT/
WORKDIR /opt/DAT
ENV CLASSPATH=/opt/DAT/DAT.jar:/opt/DAT/imageio/*:/opt/DAT/libraries/*
CMD ["java","org.rsna.dicomanonymizertool.DicomAnonymizerTool"]