Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Switch to Alpine Linux #56

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
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
44 changes: 27 additions & 17 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,21 +1,31 @@
FROM buildpack-deps:xenial

RUN apt-get update && apt-get install -y \
python-pip \
&& rm -rf /var/lib/apt/lists/* \
&& pip install --upgrade pip setuptools wheel

COPY movescu.cc.patch /tmp
RUN cd /tmp \
&& curl http://support.dcmtk.org/redmine/attachments/download/87/dcmtk-3.6.1_20150924.tar.gz | tar xz \
&& cd dcmtk-* \
&& patch --strip 1 </tmp/movescu.cc.patch \
&& ./configure \
&& make config-all ofstd-all oflog-all dcmdata-all dcmimgle-all dcmimage-all dcmjpeg-all dcmjpls-all dcmtls-all dcmnet-all \
&& make dcmnet-install dcmdata-install \
&& rm -rf /tmp/movescu.cc.patch /tmp/dcmtk-*
FROM alpine as build

RUN apk add --no-cache build-base git

RUN git clone git://git.dcmtk.org/dcmtk.git
WORKDIR dcmtk
RUN git checkout -qf 6c5329a82728bee2c7b6c7a05dbff192a2418d87

COPY dcmtk.patch .
RUN patch -p1 <dcmtk.patch

RUN ./configure
RUN make config-all ofstd-all oflog-all dcmdata-all dcmimgle-all dcmimage-all dcmjpeg-all dcmjpls-all dcmtls-all dcmnet-all
RUN make dcmdata-install dcmnet-install



FROM python:2.7-alpine

RUN apk add --no-cache libstdc++

COPY --from=build /usr/local/bin /usr/local/bin
COPY --from=build /usr/local/etc/dcmtk /usr/local/etc/dcmtk
COPY --from=build /usr/local/share/dcmtk /usr/local/share/dcmtk
COPY --from=build /usr/local/share/doc/dcmtk /usr/local/share/doc/dcmtk

COPY . /src/reaper

ENV LC_ALL="C.UTF-8"
RUN pip install -e /src/reaper

CMD ["/bin/sh"]
14 changes: 7 additions & 7 deletions movescu.cc.patch → dcmtk.patch
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
diff -Naur dcmtk-3.6.1_20150924/dcmnet/apps/movescu.cc dcmtk-3.6.1_20150924_patched/dcmnet/apps/movescu.cc
--- dcmtk-3.6.1_20150924/dcmnet/apps/movescu.cc 2015-09-24 05:27:10.000000000 -0700
+++ dcmtk-3.6.1_20150924_patched/dcmnet/apps/movescu.cc 2016-03-28 16:03:13.666855196 -0700
@@ -53,6 +53,12 @@
diff -Naur dcmtk/dcmnet/apps/movescu.cc dcmtk.patched/dcmnet/apps/movescu.cc
--- dcmtk/dcmnet/apps/movescu.cc 2017-05-30 14:10:19.000000000 -0700
+++ dcmtk.patched/dcmnet/apps/movescu.cc 2017-05-30 14:09:29.000000000 -0700
@@ -48,6 +48,12 @@

#define OFFIS_CONSOLE_APPLICATION "movescu"

Expand All @@ -14,17 +14,17 @@ diff -Naur dcmtk-3.6.1_20150924/dcmnet/apps/movescu.cc dcmtk-3.6.1_20150924_patc
static OFLogger movescuLogger = OFLog::getLogger("dcmtk.apps." OFFIS_CONSOLE_APPLICATION);

static char rcsid[] = "$dcmtk: " OFFIS_CONSOLE_APPLICATION " v"
@@ -1170,6 +1176,9 @@
@@ -1248,6 +1254,9 @@
(*assoc)->params,
dcmAllStorageSOPClassUIDs, numberOfAllDcmStorageSOPClassUIDs,
dcmAllStorageSOPClassUIDs, numberOfDcmAllStorageSOPClassUIDs,
transferSyntaxes, numTransferSyntaxes);
+ /* accept everything not known not to be a storage SOP class */
+ cond = acceptUnknownContextsWithPreferredTransferSyntaxes(
+ (*assoc)->params, transferSyntaxes, numTransferSyntaxes);
}
}
if (cond.good())
@@ -1189,6 +1198,141 @@
@@ -1267,6 +1276,141 @@
return cond;
}

Expand Down