Commit aa83c823 authored by Tigran Mkrtchyan's avatar Tigran Mkrtchyan
Browse files

containers: add Dokerfle to build dcache container

parent 34743bdd
Pipeline #30753 failed with stages
in 6 minutes and 55 seconds
FROM centos:7
ENV DCACHE_VERSION=8.1.0-1
ENV DNL_URL=https://www.dcache.org/old/downloads/1.9/repo/8.1/
RUN yum install -y curl
RUN curl --silent -L -O ${DNL_URL}/dcache-${DCACHE_VERSION}.noarch.rpm
RUN curl --silent -L -O https://www.desy.de/~tigran/ca_dCacheORG-3.0-4.noarch.rpm
RUN yum localinstall -y ./dcache-${DCACHE_VERSION}.noarch.rpm
RUN yum localinstall -y ./ca_dCacheORG-3.0-4.noarch.rpm
RUN rm ca_dCacheORG-3.0-4.noarch.rpm dcache-${DCACHE_VERSION}.noarch.rpm
COPY dcache.conf /etc/dcache/dcache.conf
COPY k8s.conf /etc/dcache/layouts/k8s.conf
## fake systemd
RUN yum install -y python3 python36-urllib3 python36-requests
#RUN curl --silent -L -O https://raw.githubusercontent.com/gdraheim/docker-systemctl-replacement/master/files/docker/systemctl.py
RUN curl --silent -L -O https://raw.githubusercontent.com/kofemann/docker-systemctl-replacement/master/files/docker/systemctl3.py
RUN chmod +x ./systemctl3.py && mv ./systemctl3.py /usr/bin/systemctl
RUN yum clean all && rm -rf /var/lib/rpm
RUN curl --silent https://raw.githubusercontent.com/kofemann/autoca/v1.0-py3/pyclient/autoca-client -o autoca-client && chmod a+x autoca-client
COPY run.sh /run.sh
RUN chmod +x /run.sh
RUN chown dcache:dcache /mnt
CMD ["/run.sh"]
dcache.layout=k8s
#!/bin/sh
if [ x$1 != x ]
then
python3 /autoca-client -n -k /etc/grid-security/hostkey.pem -c /etc/grid-security/hostcer.pem ${AUTOCA_URL} $1
fi
if [ ! -f /.init_complete ]
then
for f in `ls /dcache.init.d`
do
. /dcache.init.d/$f
done
touch /.init_complete
fi
systemctl daemon-reload
systemctl list-dependencies dcache.target
systemctl start dcache.target
systemctl log -f dcache@*
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