|
1 |
| -FROM debian:bullseye-slim |
| 1 | +FROM debian:bookworm-slim AS build |
| 2 | +RUN apt-get update \ |
| 3 | + && apt-get -y --quiet upgrade \ |
| 4 | + && apt-get install -y --no-install-recommends \ |
| 5 | + autoconf \ |
| 6 | + automake \ |
| 7 | + build-essential \ |
| 8 | + ca-certificates \ |
| 9 | + cmake \ |
| 10 | + curl \ |
| 11 | + g++ \ |
| 12 | + gcc \ |
| 13 | + git \ |
| 14 | + libboost-filesystem-dev \ |
| 15 | + libboost-log-dev \ |
| 16 | + libboost-system-dev \ |
| 17 | + libboost-thread-dev \ |
| 18 | + libcurl4-openssl-dev \ |
| 19 | + libgoogle-perftools-dev \ |
| 20 | + libssl-dev \ |
| 21 | + libtool \ |
| 22 | + libtool-bin \ |
| 23 | + make \ |
| 24 | + zlib1g-dev |
| 25 | + |
| 26 | +WORKDIR /usr/local/src/drachtio-server |
| 27 | +COPY . . |
| 28 | +RUN ./bootstrap.sh |
| 29 | +WORKDIR /usr/local/src/drachtio-server/build |
| 30 | +ARG MYVERSION=1.0.0 |
| 31 | +RUN ../configure --enable-tcmalloc=yes CPPFLAGS='-DNDEBUG' CXXFLAGS='-O2' |
| 32 | +RUN make -j$(nproc) MYVERSION=${VERSION} |
2 | 33 |
|
| 34 | +FROM debian:bookworm-slim |
3 | 35 | RUN apt-get update \
|
4 |
| - && apt-get -y --quiet --force-yes upgrade \ |
5 |
| - && apt-get install -y --no-install-recommends ca-certificates gcc g++ make build-essential cmake git autoconf automake curl libtool libtool-bin libssl-dev libcurl4-openssl-dev zlib1g-dev libgoogle-perftools-dev \ |
6 |
| - && git clone --depth=50 --branch=main https://github.com/drachtio/drachtio-server.git /usr/local/src/drachtio-server \ |
7 |
| - && cd /usr/local/src/drachtio-server \ |
8 |
| - && git submodule update --init --recursive \ |
9 |
| - && ./bootstrap.sh \ |
10 |
| - && mkdir /usr/local/src/drachtio-server/build \ |
11 |
| - && cd /usr/local/src/drachtio-server/build \ |
12 |
| - && ../configure --enable-tcmalloc=yes CPPFLAGS='-DNDEBUG' CXXFLAGS='-O2' \ |
13 |
| - && make \ |
14 |
| - && make install \ |
15 |
| - && apt-get purge -y --quiet --auto-remove gcc g++ make cmake build-essential git autoconf automake libtool libtool-bin \ |
16 |
| - && rm -rf /var/lib/apt/* \ |
17 |
| - && rm -rf /var/lib/dpkg/* \ |
18 |
| - && rm -rf /var/lib/cache/* \ |
19 |
| - && rm -Rf /var/log/* \ |
20 |
| - && rm -Rf /var/lib/apt/lists/* \ |
21 |
| - && cd /usr/local/src \ |
22 |
| - && cp drachtio-server/docker.drachtio.conf.xml /etc/drachtio.conf.xml \ |
23 |
| - && cp drachtio-server/entrypoint.sh / \ |
24 |
| - && rm -Rf drachtio-server \ |
25 |
| - && cd /usr/local/bin \ |
26 |
| - && rm -f timer ssltest parser uri_test test_https test_asio_curl |
| 36 | + && apt-get -y --quiet upgrade \ |
| 37 | + && apt-get install -y --no-install-recommends \ |
| 38 | + ca-certificates \ |
| 39 | + curl \ |
| 40 | + libboost-filesystem1.74.0 \ |
| 41 | + libboost-log1.74.0 \ |
| 42 | + libboost-system1.74.0 \ |
| 43 | + libboost-thread1.74.0 \ |
| 44 | + && rm -rf /var/lib/apt/lists/* /var/cache/apt/archives/* |
27 | 45 |
|
| 46 | +COPY --from=build /usr/local/src/drachtio-server/build/drachtio /usr/local/bin/ |
28 | 47 | COPY ./entrypoint.sh /
|
29 | 48 |
|
30 | 49 | VOLUME ["/config"]
|
|
0 commit comments