-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
40 lines (36 loc) · 1.28 KB
/
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
FROM debian:trixie-slim as build
ARG DEBIAN_FRONTEND=noninteractive
ARG TZ=UTC
ARG version=0.1.7
ENV CMAKE_INSTALL_PREFIX=/usr
RUN apt-get update && apt-get install -y \
build-essential \
cmake \
wget \
patch \
pkg-config \
libssl-dev \
libcurl4-openssl-dev \
libxrdapputils2t64 \
libxrootd-server-dev \
libtinyxml2-dev
WORKDIR /opt/
RUN wget https://github.com/PelicanPlatform/xrootd-s3-http/archive/refs/tags/v${version}/xrootd-s3-http-${version}.tar.gz && \
tar -xvf xrootd-s3-http-${version}.tar.gz && \
mv xrootd-s3-http-${version} xrootd-s3-http && \
cd xrootd-s3-http && \
mkdir build
COPY ./cmake.patch /opt/xrootd-s3-http
RUN cd /opt/xrootd-s3-http && patch -p1 < cmake.patch
WORKDIR /opt/xrootd-s3-http/build
RUN cmake -DXROOTD_EXTERNAL_TINYXML2=ON ..
RUN make
FROM debian:trixie-slim
RUN apt-get update && \
apt-get install -y --no-install-recommends \
xrootd-server libc6 libcurl4t64 libgcc-s1 libssl3t64 libstdc++6 libtinyxml2-10 libxrdserver3t64 libxrdutils3t64 ca-certificates
COPY --from=build /opt/xrootd-s3-http/build/libXrdS3-5.so /usr/lib/
COPY --from=build /opt/xrootd-s3-http/build/libXrdHTTPServer-5.so /usr/lib/
COPY ./xrootd-s3-http.cfg /etc/xrootd/
USER xrootd
CMD ["xrootd", "-c", "/etc/xrootd/xrootd-s3-http.cfg"]