forked from xrootd/xrootd
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[docker] Update xrd-docker and Dockerfiles for new packaging
The tests now run as part of the RPM builds, so no need to setup and start containers. Just running the builds will already run the tests.
- Loading branch information
Showing
10 changed files
with
159 additions
and
334 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,46 +1,32 @@ | ||
FROM almalinux:8 | ||
|
||
# Install tools necessary for RPM development | ||
RUN dnf install -y rpm-build rpmdevtools dnf-plugins-core epel-release \ | ||
RUN dnf install -y dnf-plugins-core epel-release rpmdevtools sudo \ | ||
&& dnf config-manager --set-enabled powertools | ||
|
||
# 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 | ||
|
||
WORKDIR /root | ||
|
||
# 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 -D 'dist .el8' --define '_with_isal 1' --define '_with_python3 1' \ | ||
--define '_with_scitokens 1' --define '_with_tests 1' --define '_with_xrdclhttp 1' \ | ||
--define '_build_name_fmt %%{NAME}-%%{VERSION}-%%{RELEASE}.%%{ARCH}.rpm' xrootd.spec | ||
RUN dnf builddep -y xrootd.spec | ||
|
||
# Build RPMS for XRootD | ||
RUN rpmbuild -bb -D 'dist .el8' --define '_with_isal 1' --define '_with_python3 1' \ | ||
--define '_with_scitokens 1' --define '_with_tests 1' --define '_with_xrdclhttp 1' \ | ||
--define '_build_name_fmt %%{NAME}-%%{VERSION}-%%{RELEASE}.%%{ARCH}.rpm' xrootd.spec | ||
|
||
# Second stage, build test image | ||
FROM almalinux:8 | ||
|
||
COPY --from=0 /root/rpmbuild/RPMS/* /tmp/ | ||
|
||
# Install RPMS for XRootD and cleanup unneeded files | ||
RUN rm /tmp/*-{devel,doc}* \ | ||
&& dnf install -y dnf-plugins-core epel-release \ | ||
&& dnf config-manager --set-enabled powertools \ | ||
&& dnf install -y /tmp/*.rpm \ | ||
&& dnf autoremove -y \ | ||
&& rm -rf /tmp/* | ||
|
||
# Copy configuration files | ||
COPY config/*.cfg /etc/xrootd/ | ||
COPY scripts/setup.sh /bin/setup.sh | ||
RUN sudo -u xrootd rpmbuild -bb --with git xrootd.spec | ||
|
||
CMD [ "/sbin/init" ] | ||
# Install RPMS | ||
RUN yum install -y rpmbuild/RPMS/*/*.rpm |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,46 +1,32 @@ | ||
FROM almalinux:9 | ||
|
||
# Install tools necessary for RPM development | ||
RUN dnf install -y rpm-build rpmdevtools dnf-plugins-core epel-release \ | ||
RUN dnf install -y dnf-plugins-core epel-release rpmdevtools sudo \ | ||
&& dnf config-manager --set-enabled crb | ||
|
||
# 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 | ||
|
||
WORKDIR /root | ||
|
||
# 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 -D 'dist .el9' --define '_with_isal 1' --define '_with_python3 1' \ | ||
--define '_with_scitokens 1' --define '_with_tests 1' --define '_with_xrdclhttp 1' \ | ||
--define '_build_name_fmt %%{NAME}-%%{VERSION}-%%{RELEASE}.%%{ARCH}.rpm' xrootd.spec | ||
RUN dnf builddep -y xrootd.spec | ||
|
||
# Build RPMS for XRootD | ||
RUN rpmbuild -bb -D 'dist .el9' --define '_with_isal 1' --define '_with_python3 1' \ | ||
--define '_with_scitokens 1' --define '_with_tests 1' --define '_with_xrdclhttp 1' \ | ||
--define '_build_name_fmt %%{NAME}-%%{VERSION}-%%{RELEASE}.%%{ARCH}.rpm' xrootd.spec | ||
|
||
# Second stage, build test image | ||
FROM almalinux:9 | ||
|
||
COPY --from=0 /root/rpmbuild/RPMS/* /tmp/ | ||
|
||
# Install RPMS for XRootD and cleanup unneeded files | ||
RUN rm /tmp/*-{devel,doc}* \ | ||
&& dnf install -y dnf-plugins-core epel-release \ | ||
&& dnf config-manager --set-enabled crb \ | ||
&& dnf install -y /tmp/*.rpm \ | ||
&& dnf autoremove -y \ | ||
&& rm -rf /tmp/* | ||
|
||
# Copy configuration files | ||
COPY config/*.cfg /etc/xrootd/ | ||
COPY scripts/setup.sh /bin/setup.sh | ||
RUN sudo -u xrootd rpmbuild -bb --with git xrootd.spec | ||
|
||
CMD [ "/sbin/init" ] | ||
# Install RPMS | ||
RUN yum install -y rpmbuild/RPMS/*/*.rpm |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
ARG version=12 | ||
FROM debian:$version | ||
|
||
RUN apt update | ||
RUN apt install -y build-essential devscripts equivs sudo | ||
|
||
# Create xrootd user to avoid running tests as root | ||
RUN groupadd xrootd && useradd -g xrootd -m xrootd | ||
|
||
USER xrootd | ||
WORKDIR /home/xrootd | ||
|
||
# XRootD source tarball must be created in the | ||
# current directory in order to build this image | ||
COPY xrootd.tar.gz . | ||
|
||
# Extract tarball | ||
RUN tar xzf xrootd.tar.gz | ||
|
||
USER root | ||
WORKDIR /home/xrootd/xrootd | ||
|
||
# Install build dependencies with dnf | ||
RUN echo yes | mk-build-deps --install --remove debian/control | ||
|
||
# Build DEB packages for XRootD | ||
RUN export VERSION=$(sed -e 's/v//; s/-rc/~rc/; s/-g/+git/; s/-/.post/; s/-/./' < VERSION) \ | ||
&& sudo -u xrootd dch --create --package xrootd -v ${VERSION} -M 'XRootD automated build.' \ | ||
&& sudo -u xrootd debuild --no-tgz-check --no-sign -b | ||
|
||
RUN apt install -y ../*.d*eb |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
ARG version=22.04 | ||
FROM ubuntu:$version | ||
|
||
ENV DEBIAN_FRONTEND=noninteractive | ||
|
||
RUN apt update | ||
RUN apt install -y build-essential devscripts equivs sudo | ||
|
||
# Create xrootd user to avoid running tests as root | ||
RUN groupadd xrootd && useradd -g xrootd -m xrootd | ||
|
||
USER xrootd | ||
WORKDIR /home/xrootd | ||
|
||
# XRootD source tarball must be created in the | ||
# current directory in order to build this image | ||
COPY xrootd.tar.gz . | ||
|
||
# Extract tarball | ||
RUN tar xzf xrootd.tar.gz | ||
|
||
USER root | ||
WORKDIR /home/xrootd/xrootd | ||
|
||
# Install build dependencies with dnf | ||
RUN echo yes | mk-build-deps --install --remove debian/control | ||
|
||
# Build DEB packages for XRootD | ||
RUN export VERSION=$(sed -e 's/v//; s/-rc/~rc/; s/-g/+git/; s/-/.post/; s/-/./' < VERSION) \ | ||
&& sudo -u xrootd dch --create --package xrootd -v ${VERSION} -M 'XRootD automated build.' \ | ||
&& sudo -u xrootd debuild --no-tgz-check --no-sign -b | ||
|
||
RUN apt install -y ../*.d*eb |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.