forked from LibreDWG/libredwg
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile-dist
43 lines (40 loc) · 1.63 KB
/
Dockerfile-dist
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
# podman/docker build -t libredwg-dist -f Dockerfile-dist .
############################
# STEP 1 build package from a local dist-xz (i.e. make check-docker)
############################
FROM python:3.7.7-buster AS extracting
ARG distdir
# libxml2-dev is broken so we need to compile it by our own
ARG LIBXML2VER=2.9.9
RUN apt-get update && \
apt-get install -y --no-install-recommends git autoconf libtool swig texinfo \
build-essential gcc libxml2 libxml2-dev python3-libxml2 libpcre2-dev libpcre2-32-0 \
wget libperl-dev && \
mkdir libxmlInstall && cd libxmlInstall && \
wget ftp://xmlsoft.org/libxml2/libxml2-$LIBXML2VER.tar.gz && \
tar xf libxml2-$LIBXML2VER.tar.gz && \
cd libxml2-$LIBXML2VER/ && \
./configure && \
make && \
make install && \
cd /libxmlInstall && \
rm -rf gg libxml2-$LIBXML2VER.tar.gz libxml2-$LIBXML2VER
WORKDIR /app
COPY ${distdir}.tar.xz .
RUN tar xfJ ${distdir}.tar.xz && \
cd ${distdir} && \
./configure --enable-release && \
make && \
mkdir -p /app/libredwg-install && \
make check DOCKER=1 DESTDIR="/app/libredwg-install" && \
make install DESTDIR="/app/libredwg-install"
############################
# STEP 2 install into stable-slim
############################
FROM debian:stable-slim
COPY --from=extracting /app/libredwg-install/usr/local/bin/* /usr/local/bin/
COPY --from=extracting /app/libredwg-install/usr/local/include/* /usr/local/include/
COPY --from=extracting /app/libredwg-install/usr/local/lib/* /usr/local/lib/
COPY --from=extracting /app/libredwg-install/usr/local/share/* /usr/local/share/
RUN ldconfig
CMD [ "sh" ]