-
Notifications
You must be signed in to change notification settings - Fork 111
/
3dfier.dockerfile
74 lines (61 loc) · 1.67 KB
/
3dfier.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
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
FROM tudelft3d/3dfier:base AS builder
ARG JOBS
#
# 13 Install 3dfier
#
COPY . /tmp
RUN cd /tmp && \
mkdir build && \
cd build && \
cmake \
-DCGAL_DIR=/usr/local \
-DCMAKE_BUILD_TYPE=Release \
-DBoost_NO_BOOST_CMAKE=TRUE \
-DBoost_NO_SYSTEM_PATHS=TRUE \
-DBOOST_ROOT=/usr/local \
.. && \
make -j $JOBS && \
make install && \
cd ~ && \
apk del .3dfier-deps && \
rm -rf /tmp/* && \
rm -rf /user/local/man
RUN 3dfier --version
# removing unnecessary headers
RUN rm -rf /usr/local/include
RUN mkdir /data && \
chown 1001 /data && \
chgrp 0 /data && \
chmod g=u /data && \
chgrp 0 /etc/passwd && \
chmod g=u /etc/passwd
#
# Export the dependencies
#
RUN mkdir /export
COPY strip-docker-image-export /tmp
RUN bash /tmp/strip-docker-image-export \
-v \
-d /export \
-f /bin/bash \
-f /usr/bin/awk \
-f /usr/bin/id \
-f /etc/passwd \
-f /bin/ls \
-f /data \
-f /usr/local/share/proj/proj.db \
-f /usr/local/bin/3dfier
FROM scratch AS exe
LABEL org.opencontainers.image.authors="Balázs Dukai <[email protected]>"
LABEL org.opencontainers.image.source="https://github.com/tudelft3d/3dfier"
LABEL org.opencontainers.image.vendor="3DGI"
LABEL org.opencontainers.image.title="3dfier"
LABEL org.opencontainers.image.description="The open-source tool for creating 3D models"
LABEL org.opencontainers.image.licenses="GPL-3.0"
LABEL org.opencontainers.image.url="http://tudelft3d.github.io/3dfier"
COPY --from=builder /export/ /
COPY --chown=1001:0 uid_entrypoint.sh /usr/local/bin/
USER 1001
WORKDIR /data
ENTRYPOINT ["/usr/local/bin/uid_entrypoint.sh"]
CMD ["3dfier"]