generated from FNNDSC/python-chrisapp-template
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfile
37 lines (24 loc) · 1009 Bytes
/
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
# Caution: this Dockerfile is prone to fail on niche bugs,
# make sure your docker and QEMU binfmt setup are up to date.
# compile dcm2niix from source
FROM alpine:3.16 as builder
RUN apk add build-base git cmake make
WORKDIR /tmp
ADD https://github.com/rordenlab/dcm2niix/archive/refs/tags/v1.0.20211006.tar.gz /tmp/v1.0.20211006.tar.gz
RUN tar xf /tmp/v1.0.20211006.tar.gz
RUN mkdir /tmp/dcm2niix-1.0.20211006/build
WORKDIR /tmp/dcm2niix-1.0.20211006/build
RUN cmake ..
RUN make
# install Python ChRIS plugin
FROM docker.io/python:3.10.4-alpine3.16
LABEL org.opencontainers.image.authors="FNNDSC <[email protected]>" \
org.opencontainers.image.title="pl-dcm2niix" \
org.opencontainers.image.description="A ChRIS ds plugin wrapper for dcm2niix"
WORKDIR /usr/local/src/pl-dcm2niix
COPY requirements.txt .
RUN pip install -r requirements.txt
COPY . .
RUN pip install .
COPY --from=builder /tmp/dcm2niix-1.0.20211006/build/bin/dcm2niix /usr/local/bin/dcm2niix
CMD ["dcm2niixw", "--help"]