-
Notifications
You must be signed in to change notification settings - Fork 105
/
Dockerfile
25 lines (21 loc) · 1.16 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
FROM centos:7
ENV ruby_ver="3.3.6"
RUN sed -i 's/mirrorlist/#mirrorlist/g' /etc/yum.repos.d/CentOS-* && \
sed -i 's|#baseurl=http://mirror.centos.org|baseurl=http://vault.centos.org|g' /etc/yum.repos.d/CentOS-* && \
yum -y update
RUN yum -y install epel-release
RUN yum -y install git make autoconf curl wget rpm-build
RUN yum -y install gcc-c++ glibc-headers openssl-devel readline libyaml-devel readline-devel zlib zlib-devel sqlite-devel bzip2
RUN git clone https://github.com/sstephenson/rbenv.git /usr/local/rbenv
RUN git clone https://github.com/sstephenson/ruby-build.git /usr/local/rbenv/plugins/ruby-build
RUN echo 'export RBENV_ROOT="/usr/local/rbenv"' >> /root/.bashrc
RUN echo 'export PATH="${RBENV_ROOT}/bin:${PATH}"' >> /root/.bashrc
RUN echo 'eval "$(rbenv init --no-rehash -)"' >> /root/.bashrc
RUN source /root/.bashrc;rbenv install ${ruby_ver}; rbenv global ${ruby_ver};
ADD ./ /tmp/build
RUN mkdir -p ~/rpmbuild/{BUILD,RPMS,SOURCES,SPECS,SRPMS}
RUN echo "%_topdir $HOME/rpmbuild" > ~/.rpmmacros
RUN source /root/.bashrc;gem install package_cloud
ENV LANG en_US.UTF-8
RUN chmod -v +x /tmp/build/rhel.sh
RUN source /root/.bashrc;cd /tmp/build && bash ./rhel.sh