File: Dockerfile.fedora

package info (click to toggle)
xrootd 5.9.1-3
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 25,956 kB
  • sloc: cpp: 244,425; sh: 2,691; python: 1,980; ansic: 1,027; perl: 814; makefile: 272
file content (32 lines) | stat: -rw-r--r-- 813 bytes parent folder | download | duplicates (2)
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
ARG version=rawhide
FROM fedora:$version

# Install tools necessary for RPM development
RUN dnf install -y dnf-plugins-core rpmdevtools sudo

# Create xrootd user to avoid running tests as root
RUN groupadd xrootd && useradd -g xrootd -m xrootd

USER xrootd
WORKDIR /home/xrootd

# Create directory tree for building RPMs
RUN rpmdev-setuptree

# XRootD source tarball must be created in the
# current directory in order to build this image
COPY xrootd.tar.gz rpmbuild/SOURCES

# Extract spec file to build RPMs
RUN tar xzf rpmbuild/SOURCES/xrootd.tar.gz --strip-components=1 xrootd/xrootd.spec

USER root

# Install build dependencies with dnf
RUN dnf builddep -y xrootd.spec

# Build RPMS for XRootD
RUN sudo -u xrootd rpmbuild -bb --with git xrootd.spec

# Install RPMS
RUN yum install -y rpmbuild/RPMS/*/*.rpm