Debian Codegraph @

Dockerfile

raw
1 FROM ubuntu:bionic
2 # FROM ubuntu:eoan
3
4 RUN apt-get update && apt-get install -y -q eatmydata \
5 && eatmydata apt-get update && apt-get install -y -q \
6 cmake \
7 gcc \
8 git \
9 help2man \
10 libexpat1-dev \
11 make \
12 wget \
13 zlib1g-dev \
14 && rm -rf /var/lib/apt/lists/*
15
16 # Install newer cmake version with globally scoped targets for convenience
17 # (apt installed version is used by default though)
18 ENV CMAKE_VER=3.13.3
19 RUN wget -P /opt/cmake https://github.com/Kitware/CMake/releases/download/v${CMAKE_VER}/cmake-${CMAKE_VER}-Linux-x86_64.tar.gz \
20 ; cd /opt/cmake \
21 ; tar xzvf cmake-${CMAKE_VER}-Linux-x86_64.tar.gz \
22 ;rm -fr cmake-${CMAKE_VER}-Linux-x86_64.tar.gz
23
24 RUN mkdir -p /opt/src/nifti_clib
25 RUN mkdir /nifti_build
26 COPY . /opt/src/nifti_clib/
27
28 WORKDIR /nifti_build
29
30 # Test build and install with system-installed cmake
31 RUN cmake \
32 -DBUILD_SHARED_LIBS=ON \
33 -DNIFTI_USE_PACKAGING=ON \
34 -DUSE_CIFTI_CODE=ON \
35 -DUSE_FSL_CODE=ON \
36 -DNIFTI_BUILD_APPLICATIONS=ON \
37 -DTEST_INSTALL=ON \
38 -DDOWNLOAD_TEST_DATA=OFF \
39 /opt/src/nifti_clib \
40 && make install \
41 && ctest --output-on-failure -LE NEEDS_DATA
42
43 # For checking max-verified cmake version successfully builds:
44 # ENV PATH="/opt/cmake/cmake-${CMAKE_VER}-Linux-x86_64/bin:$PATH"
45 # RUN cmake \
46 # -DBUILD_SHARED_LIBS=OFF \
47 # -DUSE_CIFTI_CODE=ON \
48 # -DUSE_FSL_CODE=ON \
49 # -DNIFTI_BUILD_APPLICATIONS=ON \
50 # -DTEST_INSTALL=ON \
51 # /opt/src/nifti_clib \
52 # && make install \
53 # && ctest --output-on-failure