Skip to content

Commit

Permalink
add fedora 31 and centos 8
Browse files Browse the repository at this point in the history
  • Loading branch information
jeroen committed Oct 23, 2019
1 parent 899bff3 commit f2c22da
Show file tree
Hide file tree
Showing 8 changed files with 89 additions and 12 deletions.
4 changes: 2 additions & 2 deletions docker/centos-7/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -23,15 +23,15 @@ RUN \

RUN \
cd ~ && \
wget https://github.com/jeffreyhorner/rapache/archive/v1.2.9.tar.gz -O rapache-1.2.9.tar.gz && \
wget --quiet https://github.com/jeffreyhorner/rapache/archive/v1.2.9.tar.gz -O rapache-1.2.9.tar.gz && \
tar xzvf rapache-1.2.9.tar.gz rapache-1.2.9/rpm/rapache.spec --strip-components 2 && \
mv -f rapache-1.2.9.tar.gz ~/rpmbuild/SOURCES/ && \
mv -f rapache.spec ~/rpmbuild/SPECS/ && \
rpmbuild -ba ~/rpmbuild/SPECS/rapache.spec

RUN \
cd ~ && \
wget https://github.com/opencpu/opencpu-server/archive/v${BRANCH}.tar.gz -O opencpu-server-${BRANCH}.tar.gz && \
wget --quiet https://github.com/opencpu/opencpu-server/archive/v${BRANCH}.tar.gz -O opencpu-server-${BRANCH}.tar.gz && \
tar xzvf opencpu-server-${BRANCH}.tar.gz opencpu-server-${BRANCH}/rpm/opencpu.spec --strip-components 2 && \
mv -f opencpu-server-${BRANCH}.tar.gz ~/rpmbuild/SOURCES/ && \
mv -f opencpu.spec ~/rpmbuild/SPECS/ && \
Expand Down
76 changes: 76 additions & 0 deletions docker/centos-8/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,76 @@
FROM centos:centos8

ENV BRANCH 2.1
ENV RSTUDIO 1.2.5001

# Enable EPEL
RUN \
yum upgrade -y && \
yum install -y 'dnf-command(config-manager)' && \
yum install -y epel-release && \
yum config-manager --enable PowerTools epel-testing

# Install.
RUN \
useradd -ms /bin/bash builder && \
yum update -y && \
yum upgrade -y && \
yum install -y rpm-build make wget tar httpd-devel libapreq2-devel R-devel libcurl-devel protobuf-devel openssl-devel libxml2-devel libicu-devel createrepo && \
yum clean all

USER builder

RUN \
mkdir -p ~/rpmbuild/SOURCES && \
mkdir -p ~/rpmbuild/SPECS

RUN \
cd ~ && \
wget --quiet https://github.com/jeffreyhorner/rapache/archive/v1.2.9.tar.gz -O rapache-1.2.9.tar.gz && \
tar xzvf rapache-1.2.9.tar.gz rapache-1.2.9/rpm/rapache.spec --strip-components 2 && \
mv -f rapache-1.2.9.tar.gz ~/rpmbuild/SOURCES/ && \
mv -f rapache.spec ~/rpmbuild/SPECS/ && \
rpmbuild -ba ~/rpmbuild/SPECS/rapache.spec

RUN \
cd ~ && \
wget --quiet https://github.com/opencpu/opencpu-server/archive/master.tar.gz -O opencpu-server-master.tar.gz && \
tar xzvf opencpu-server-master.tar.gz opencpu-server-master/rpm/opencpu.spec --strip-components 2 && \
mv -f opencpu-server-master.tar.gz ~/rpmbuild/SOURCES/ && \
mv -f opencpu.spec ~/rpmbuild/SPECS/ && \
rpmbuild -ba ~/rpmbuild/SPECS/opencpu.spec --define "branch master"

RUN \
createrepo ~/rpmbuild/RPMS/x86_64/

USER root

RUN \
cp -Rf /home/builder/rpmbuild/RPMS ~/ && \
cp -Rf /home/builder/rpmbuild/SRPMS ~/ && \
userdel -r builder

RUN \
yum install -y MTA mod_ssl /usr/sbin/semanage && \
cd ~/RPMS/x86_64/ && \
rpm -i rapache-*.rpm && \
rpm -i opencpu-lib-*.rpm && \
rpm -i opencpu-server-*.rpm

RUN \
wget https://download2.rstudio.org/server/centos6/x86_64/rstudio-server-rhel-${RSTUDIO}-x86_64.rpm && \
yum install -y --nogpgcheck rstudio-server-rhel-${RSTUDIO}-x86_64.rpm && \
rm rstudio-server-rhel-${RSTUDIO}-x86_64.rpm && \
echo "server-app-armor-enabled=0" >> /etc/rstudio/rserver.conf

RUN \
yum remove -y httpd-devel libapreq2-devel && \
yum clean all

# Apache ports
EXPOSE 80
EXPOSE 443
EXPOSE 8004

# Define default command.
CMD /usr/lib/rstudio-server/bin/rserver && apachectl -DFOREGROUND
1 change: 1 addition & 0 deletions docker/centos-8/README.md
2 changes: 1 addition & 1 deletion docker/debian-10/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ USER builder

RUN \
cd ~ && \
wget https://github.com/opencpu/opencpu-server/archive/v${BRANCH}.tar.gz && \
wget --quiet https://github.com/opencpu/opencpu-server/archive/v${BRANCH}.tar.gz && \
tar xzf v${BRANCH}.tar.gz && \
cd opencpu-server-${BRANCH} && \
sed -i 's/bionic/buster/g' debian/changelog && \
Expand Down
2 changes: 1 addition & 1 deletion docker/debian-9/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ USER builder

RUN \
cd ~ && \
wget https://github.com/opencpu/opencpu-server/archive/v${BRANCH}.tar.gz && \
wget --quiet https://github.com/opencpu/opencpu-server/archive/v${BRANCH}.tar.gz && \
tar xzf v${BRANCH}.tar.gz && \
cd opencpu-server-${BRANCH} && \
sed -i 's/bionic/stretch/g' debian/changelog && \
Expand Down
6 changes: 3 additions & 3 deletions docker/fedora-30/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ RUN \
useradd -ms /bin/bash builder && \
yum update -y && \
yum upgrade -y && \
yum install -y rpm-build make wget tar httpd-devel libapreq2-devel R-devel libcurl-devel protobuf-devel openssl-devel libxml2-devel libicu-devel libssh2-devel createrepo && \
yum install -y rpm-build make wget tar httpd-devel libapreq2-devel R-devel libcurl-devel protobuf-devel openssl-devel libxml2-devel libicu-devel createrepo && \
yum clean all

USER builder
Expand All @@ -19,15 +19,15 @@ RUN \

RUN \
cd ~ && \
wget https://github.com/jeffreyhorner/rapache/archive/v1.2.9.tar.gz -O rapache-1.2.9.tar.gz && \
wget --quiet https://github.com/jeffreyhorner/rapache/archive/v1.2.9.tar.gz -O rapache-1.2.9.tar.gz && \
tar xzvf rapache-1.2.9.tar.gz rapache-1.2.9/rpm/rapache.spec --strip-components 2 && \
mv -f rapache-1.2.9.tar.gz ~/rpmbuild/SOURCES/ && \
mv -f rapache.spec ~/rpmbuild/SPECS/ && \
rpmbuild -ba ~/rpmbuild/SPECS/rapache.spec

RUN \
cd ~ && \
wget https://github.com/opencpu/opencpu-server/archive/v${BRANCH}.tar.gz -O opencpu-server-${BRANCH}.tar.gz && \
wget --quiet https://github.com/opencpu/opencpu-server/archive/v${BRANCH}.tar.gz -O opencpu-server-${BRANCH}.tar.gz && \
tar xzvf opencpu-server-${BRANCH}.tar.gz opencpu-server-${BRANCH}/rpm/opencpu.spec --strip-components 2 && \
mv -f opencpu-server-${BRANCH}.tar.gz ~/rpmbuild/SOURCES/ && \
mv -f opencpu.spec ~/rpmbuild/SPECS/ && \
Expand Down
8 changes: 4 additions & 4 deletions docker/fedora-29/Dockerfile → docker/fedora-31/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM fedora:29
FROM fedora:31

ENV BRANCH 2.1
ENV RSTUDIO 1.2.5001
Expand All @@ -8,7 +8,7 @@ RUN \
useradd -ms /bin/bash builder && \
yum update -y && \
yum upgrade -y && \
yum install -y rpm-build make wget tar httpd-devel libapreq2-devel R-devel libcurl-devel protobuf-devel openssl-devel libxml2-devel libicu-devel libssh2-devel createrepo && \
yum install -y rpm-build make wget tar httpd-devel libapreq2-devel R-devel libcurl-devel protobuf-devel openssl-devel libxml2-devel libicu-devel createrepo && \
yum clean all

USER builder
Expand All @@ -19,15 +19,15 @@ RUN \

RUN \
cd ~ && \
wget https://github.com/jeffreyhorner/rapache/archive/v1.2.9.tar.gz -O rapache-1.2.9.tar.gz && \
wget --quiet https://github.com/jeffreyhorner/rapache/archive/v1.2.9.tar.gz -O rapache-1.2.9.tar.gz && \
tar xzvf rapache-1.2.9.tar.gz rapache-1.2.9/rpm/rapache.spec --strip-components 2 && \
mv -f rapache-1.2.9.tar.gz ~/rpmbuild/SOURCES/ && \
mv -f rapache.spec ~/rpmbuild/SPECS/ && \
rpmbuild -ba ~/rpmbuild/SPECS/rapache.spec

RUN \
cd ~ && \
wget https://github.com/opencpu/opencpu-server/archive/v${BRANCH}.tar.gz -O opencpu-server-${BRANCH}.tar.gz && \
wget --quiet https://github.com/opencpu/opencpu-server/archive/v${BRANCH}.tar.gz -O opencpu-server-${BRANCH}.tar.gz && \
tar xzvf opencpu-server-${BRANCH}.tar.gz opencpu-server-${BRANCH}/rpm/opencpu.spec --strip-components 2 && \
mv -f opencpu-server-${BRANCH}.tar.gz ~/rpmbuild/SOURCES/ && \
mv -f opencpu.spec ~/rpmbuild/SPECS/ && \
Expand Down
2 changes: 1 addition & 1 deletion docker/ubuntu-18.04/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ USER builder

RUN \
cd ~ && \
wget https://github.com/opencpu/opencpu-server/archive/v${BRANCH}.tar.gz && \
wget --quiet https://github.com/opencpu/opencpu-server/archive/v${BRANCH}.tar.gz && \
tar xzf v${BRANCH}.tar.gz && \
cd opencpu-server-${BRANCH} && \
dpkg-buildpackage -us -uc
Expand Down

0 comments on commit f2c22da

Please sign in to comment.