Skip to content

Commit 49eaac6

Browse files
committed
Dockerfile for vtk-openjdk-alpine
1 parent accce70 commit 49eaac6

File tree

2 files changed

+59
-0
lines changed

2 files changed

+59
-0
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
/.project

Dockerfile

Lines changed: 58 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,58 @@
1+
# VTK and OpenJDK n Alpine Linux
2+
FROM alpine:3.7
3+
4+
# Install some Alpine packages
5+
RUN apk add --no-cache \
6+
bash \
7+
build-base \
8+
cmake \
9+
wget \
10+
mesa-dev \
11+
mesa-osmesa \
12+
python2-dev
13+
14+
# Download and extract VTK source, then configure and build VTK
15+
RUN wget -nv -O- http://www.vtk.org/files/release/7.1/VTK-7.1.0.tar.gz | \
16+
tar xz && \
17+
cd VTK-7.1.0 && \
18+
cmake \
19+
-D CMAKE_BUILD_TYPE:STRING=Release \
20+
-D CMAKE_INSTALL_PREFIX:STRING=/usr \
21+
-D BUILD_DOCUMENTATION:BOOL=OFF \
22+
-D BUILD_EXAMPLES:BOOL=OFF \
23+
-D BUILD_TESTING:BOOL=OFF \
24+
-D BUILD_SHARED_LIBS:BOOL=ON \
25+
-D VTK_USE_X:BOOL=OFF \
26+
-D VTK_OPENGL_HAS_OSMESA:BOOL=ON \
27+
-D OSMESA_LIBRARY=/usr/lib/libOSMesa.so.8 \
28+
-D OSMESA_INCLUDE_DIR=/usr/include/GL/ \
29+
-D VTK_RENDERING_BACKEND:STRING=OpenGL \
30+
-D VTK_Group_MPI:BOOL=OFF \
31+
-D VTK_Group_StandAlone:BOOL=OFF \
32+
-D VTK_Group_Rendering:BOOL=ON \
33+
-D VTK_WRAP_PYTHON=ON \
34+
-D VTK_PYTHON_VERSION:STRING=2 \
35+
. && \
36+
make -j 2 && \
37+
make install && \
38+
cd .. && rm -rf VTK-7.1.0
39+
40+
# install thrift python package
41+
RUN wget https://bootstrap.pypa.io/get-pip.py \
42+
&& python get-pip.py \
43+
&& pip install thrift
44+
45+
RUN apk update && apk upgrade && \
46+
apk add openjdk8 && \
47+
mkdir /tmp/tmprt && \
48+
cd /tmp/tmprt && \
49+
apk add zip && \
50+
unzip -q /usr/lib/jvm/default-jvm/jre/lib/rt.jar && \
51+
apk add zip && \
52+
zip -q -r /tmp/rt.zip . && \
53+
apk del zip && \
54+
cd /tmp && \
55+
mv rt.zip /usr/lib/jvm/default-jvm/jre/lib/rt.jar && \
56+
rm -rf /tmp/tmprt /var/cache/apk/* bin/jjs bin/keytool bin/orbd bin/pack200 bin/policytool \
57+
bin/rmid bin/rmiregistry bin/servertool bin/tnameserv bin/unpack200
58+

0 commit comments

Comments
 (0)