forked from ANTsX/ANTs
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
53 lines (45 loc) · 1.68 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 ubuntu:bionic-20200112 as builder
RUN apt-get update && \
apt-get install -y --no-install-recommends \
software-properties-common \
build-essential \
apt-transport-https \
ca-certificates \
gnupg \
software-properties-common \
wget \
ninja-build \
git \
zlib1g-dev
RUN wget -O - https://apt.kitware.com/keys/kitware-archive-latest.asc 2>/dev/null \
| apt-key add - \
&& apt-add-repository -y 'deb https://apt.kitware.com/ubuntu/ bionic main' \
&& apt-get update \
&& apt-get -y install cmake=3.18.3-0kitware1 cmake-data=3.18.3-0kitware1
ADD . /tmp/ants/source
RUN mkdir -p /tmp/ants/build \
&& cd /tmp/ants/build \
&& mkdir -p /opt/ants \
&& git config --global url."https://".insteadOf git:// \
&& cmake \
-GNinja \
-DBUILD_TESTING=OFF \
-DBUILD_SHARED_LIBS=ON \
-DCMAKE_INSTALL_PREFIX=/opt/ants \
/tmp/ants/source \
&& cmake --build . --parallel \
&& cd ANTS-build \
&& cmake --install .
FROM ubuntu:bionic-20200112
COPY --from=builder /opt/ants /opt/ants
LABEL maintainer="ANTsX team" \
description="ANTs is part of the ANTsX ecosystem (https://github.com/ANTsX). \
ANTs Citation: https://pubmed.ncbi.nlm.nih.gov/24879923"
ENV ANTSPATH="/opt/ants/bin" \
PATH="/opt/ants/bin:$PATH" \
LD_LIBRARY_PATH="/opt/ants/lib:$LD_LIBRARY_PATH"
RUN apt-get update \
&& apt install -y --no-install-recommends zlib1g-dev \
&& apt-get clean && rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*
WORKDIR /data
CMD ["/bin/bash"]