Commit fe2b3df2 authored by Clemens Lange's avatar Clemens Lange
Browse files

Merge branch 'update_sw_slc6' into 'master'

Use SLC5 software update script also for SLC6 image

See merge request cms-cloud/cmssw-docker!35
parents dc2c4298 9f53b5e7
......@@ -4,7 +4,7 @@
ARG BASEIMAGE=cern/slc6-base:20190724
# Set up the SLC6 CMSSW base:
FROM ${BASEIMAGE}
FROM ${BASEIMAGE} AS cms-base
LABEL maintainer="Clemens Lange <clemens.lange@cern.ch>"
......@@ -54,6 +54,18 @@ RUN wget http://repository.egi.eu/sw/production/cas/1/current/repo-files/EGI
yum install -y ca-policy-egi-core wlcg-repo.noarch wlcg-voms-cms && \
yum clean -y all
ENV UPDATE_PATH /usr/local
RUN mkdir -p ${UPDATE_PATH}
FROM cms-base AS git-update
ADD update_script.sh /root/update_script.sh
RUN /root/update_script.sh
FROM cms-base AS slim
COPY --from=git-update ${UPDATE_PATH} ${UPDATE_PATH}
RUN groupadd -g 1000 cmsusr && adduser -u 1000 -g 1000 -G root cmsusr && \
echo "cmsusr ALL=(ALL) NOPASSWD:ALL" > /etc/sudoers && \
groupadd -g 1001 cmsinst && adduser -u 1001 -g 1001 cmsinst && \
......
......@@ -2,6 +2,11 @@
export PYTHONSTARTUP=$HOME/.pythonrc.py
export PS1='[\t] \e[91m\u\e[0m@\e[34m\h \e[36m\w \e[0m$ '
export PROMPT='[%*] %F{red}%n%f@%F{blue}%m%f %F{yellow}%3~%f $ '
# define aliases
alias cmsenv='eval `scramv1 runtime -sh`'
alias cmsrel='scramv1 project CMSSW'
# Make updated software available in PATH and LD_LIBRARY_PATH
export PATH=/usr/local/bin:${PATH}
export LD_LIBRARY_PATH=/usr/local/lib:/usr/local/lib64:${LD_LIBRARY_PATH}
yum -y groupinstall 'Development Tools'
yum remove -y openssl-devel
export INSTALL_DIR=${UPDATE_PATH}
export GETTEXT_VERSION=gettext-0.21
export ZLIB_VERSION=zlib-1.2.11
export CURL_VERSION=curl-7.73.0
export OPENSSL_VERSION=openssl-1.1.1k
export M4_VERSION=m4-1.4.19
export AUTOCONF_VERSION=autoconf-2.71
export GIT_VERSION=git-2.29.3
export PERL_VERSION=perl-5.34.0
export LD_LIBRARY_PATH=${INSTALL_DIR}/lib:${INSTALL_DIR}/lib64:${LD_LIBRARY_PATH}
export PATH=${INSTALL_DIR}/bin:${PATH}
cd ${INSTALL_DIR}
wget http://ftp.gnu.org/pub/gnu/gettext/${GETTEXT_VERSION}.tar.gz
wget http://www.zlib.net/${ZLIB_VERSION}.tar.gz
wget ftp://mirrors.gethosted.online/curl-haxx/${CURL_VERSION}.tar.gz
wget http://www.openssl.org/source/${OPENSSL_VERSION}.tar.gz
wget http://mirrors.edge.kernel.org/pub/software/scm/git/${GIT_VERSION}.tar.gz
wget http://ftp.gnu.org/gnu/m4/${M4_VERSION}.tar.gz
wget http://ftp.gnu.org/gnu/autoconf/${AUTOCONF_VERSION}.tar.gz
wget http://www.cpan.org/src/5.0/${PERL_VERSION}.tar.gz
tar xzf ${GETTEXT_VERSION}.tar.gz
cd ${GETTEXT_VERSION}
./configure --prefix=${INSTALL_DIR}
make
make install
cd ..
rm ${GETTEXT_VERSION}.tar.gz
rm -rf ${GETTEXT_VERSION}
tar xzf ${ZLIB_VERSION}.tar.gz
cd ${ZLIB_VERSION}
./configure --prefix=${INSTALL_DIR}
make
make install
cd ..
rm ${ZLIB_VERSION}.tar.gz
rm -rf ${ZLIB_VERSION}
tar -xzf ${PERL_VERSION}.tar.gz
cd ${PERL_VERSION}
./Configure -des -Dprefix=/usr/local
make
make install
cd ..
rm ${PERL_VERSION}.tar.gz
rm -rf ${PERL_VERSION}
tar xzf ${OPENSSL_VERSION}.tar.gz
cd ${OPENSSL_VERSION}
CFLAGS=-fPIC ./config --prefix=${INSTALL_DIR} shared zlib
make
make install
cd ..
rm ${OPENSSL_VERSION}.tar.gz
rm -rf ${OPENSSL_VERSION}
tar xzf ${CURL_VERSION}.tar.gz
cd ${CURL_VERSION}
./configure --prefix=${INSTALL_DIR}
make
make install
cd ..
rm ${CURL_VERSION}.tar.gz
rm -rf ${CURL_VERSION}
tar xzf ${M4_VERSION}.tar.gz
cd ${M4_VERSION}
./configure --prefix=${INSTALL_DIR}
make
make install
cd ..
rm ${M4_VERSION}.tar.gz
rm -rf ${M4_VERSION}
tar xzf ${AUTOCONF_VERSION}.tar.gz
cd ${AUTOCONF_VERSION}
./configure --prefix=${INSTALL_DIR}
make
make install
cd ..
rm ${AUTOCONF_VERSION}.tar.gz
rm -rf ${AUTOCONF_VERSION}
tar xzf ${GIT_VERSION}.tar.gz
cd ${GIT_VERSION}
make configure
./configure --prefix=${INSTALL_DIR}
make
make install
cd ..
rm ${GIT_VERSION}.tar.gz
rm -rf ${GIT_VERSION}
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment