Skip to content

Commit

Permalink
[Docker] Add docker imgs with centos 7/8 build env.
Browse files Browse the repository at this point in the history
  • Loading branch information
simonmichal authored and gganis committed Nov 23, 2021
1 parent 4108a49 commit eebdfa6
Show file tree
Hide file tree
Showing 4 changed files with 38 additions and 0 deletions.
14 changes: 14 additions & 0 deletions docker/builds/DockerfileCentos7
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
FROM centos:7
MAINTAINER Michal Simon <michal.simon@cern.ch>, CERN, 2015

USER root
RUN yum install -y epel-release
RUN yum install -y gcc-c++ rpm-build which git python-srpm-macros centos-release-scl vim
RUN git clone https://github.com/xrootd/xrootd
WORKDIR /xrootd/packaging
RUN ./makesrpm.sh --define "_with_python3 1" --define "_with_tests 1" --define "_with_xrdclhttp 1" --define "_with_scitokens 1" --define "_with_isal 1"
RUN yum-builddep -y *.src.rpm
RUN rm -f *src.rpm
WORKDIR /xrootd/build
ENTRYPOINT scl enable devtoolset-7 bash

16 changes: 16 additions & 0 deletions docker/builds/DockerfileCentos8
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
FROM centos:8
MAINTAINER Michal Simon <michal.simon@cern.ch>, CERN, 2015

USER root
RUN dnf install -y epel-release
RUN dnf install -y gcc-c++ rpm-build which git python-srpm-macros vim dnf-plugins-core
RUN dnf config-manager --set-enabled powertools
RUN git clone https://github.com/xrootd/xrootd
WORKDIR /xrootd/packaging
RUN ./makesrpm.sh --define "_with_python3 1" --define "_with_tests 1" --define "_with_xrdclhttp 1" --define "_with_scitokens 1" --define "_with_isal 1"
RUN dnf builddep -y *.src.rpm
RUN dnf -y update libarchive
RUN rm -f *src.rpm
WORKDIR /xrootd/build
ENTRYPOINT bash

4 changes: 4 additions & 0 deletions docker/builds/centos7_buildenv.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
#!/bin/bash

docker build -t xrootd/centos7/build - < DockerfileCentos7
docker run -it --rm xrootd/centos7/build
4 changes: 4 additions & 0 deletions docker/builds/centos8_buildenv.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
#!/bin/bash

docker build -t xrootd/centos8/build - < DockerfileCentos8
docker run -it --rm xrootd/centos8/build

0 comments on commit eebdfa6

Please sign in to comment.