Skip to content

Commit b0f1d77

Browse files
committed
Shrink container by only installing used programs
1 parent 436bef6 commit b0f1d77

File tree

1 file changed

+13
-3
lines changed

1 file changed

+13
-3
lines changed

ants-build/Dockerfile

+13-3
Original file line numberDiff line numberDiff line change
@@ -11,12 +11,22 @@ RUN buildDeps='cmake build-essential git zlib1g-dev' \
1111
&& apt-get install -y $buildDeps --no-install-recommends \
1212
&& rm -rf /var/lib/apt/lists/* \
1313
&& git clone https://github.com/stnava/ANTs.git /opt/ANTs-src \
14-
&& cd /opt/ANTs-src && git checkout 3e034a3a10de69e5bfb2046609931c654c2e4ad4 \
14+
&& cd /opt/ANTs-src && git checkout 1c5634faf5ba8afa0a12c71f8b0d8de774fb6e75 \
1515
&& mkdir /opt/ANTs-src/build && cd /opt/ANTs-src/build \
16-
&& cmake -DITK_BUILD_MINC_SUPPORT:BOOL=ON \
16+
&& cmake -DCMAKE_LINKER=/usr/bin/gold -DITK_BUILD_MINC_SUPPORT:BOOL=ON \
1717
-DBUILD_TESTING:BOOL=OFF -DRUN_LONG_TESTS:BOOL=OFF -DRUN_SHORT_TESTS:BOOL=OFF \
1818
-DCMAKE_BUILD_TYPE:STRING=Release /opt/ANTs-src && make -j$(nproc) \
19-
&& mkdir /opt/ANTs && mv /opt/ANTs-src/build/bin /opt/ANTs \
19+
&& ln -sf /usr/bin/gold /usr/bin/ld \
20+
&& mkdir -p /opt/ANTs/bin \
21+
&& cp /opt/ANTs-src/build/bin/antsRegistration /opt/ANTs/bin \
22+
&& cp /opt/ANTs-src/build/bin/antsApplyTransforms /opt/ANTs/bin \
23+
&& cp /opt/ANTs-src/build/bin/ImageMath /opt/ANTs/bin \
24+
&& cp /opt/ANTs-src/build/bin/PrintHeader /opt/ANTs/bin \
25+
&& cp /opt/ANTs-src/build/bin/ConvertImage /opt/ANTs/bin \
26+
&& cp /opt/ANTs-src/build/bin/ConvertScalarImageToRGB /opt/ANTs/bin \
27+
&& cp /opt/ANTs-src/build/bin/CreateTiledMosaic /opt/ANTs/bin \
28+
&& cp /opt/ANTs-src/build/bin/AverageImages /opt/ANTs/bin \
29+
&& cp /opt/ANTs-src/build/bin/antsApplyTransformsToPoints /opt/ANTs/bin \
2030
&& rm -rf /opt/ANTs-src \
2131
&& apt-get purge -y --auto-remove $buildDeps \
2232
&& apt-get clean \

0 commit comments

Comments
 (0)