Skip to content

Commit

Permalink
Merge pull request #252 from cserf/patch-246-Restructure_Dockerfiles_…
Browse files Browse the repository at this point in the history
…_Fix__246

Restructure Dockerfiles; Fix #246
  • Loading branch information
bari12 committed Dec 1, 2017
2 parents 2803a05 + 4a32c3f commit d540361
Show file tree
Hide file tree
Showing 8 changed files with 72 additions and 58 deletions.
46 changes: 38 additions & 8 deletions etc/docker/cc7systemd/Dockerfile
Expand Up @@ -7,18 +7,48 @@
# Authors:
# - Cedric Serfon, <cedric.serfon@cern.ch>, 2017


FROM centos:7
ENV container docker

WORKDIR /tmp
ADD . /tmp

# Configure systemd
RUN (cd /lib/systemd/system/sysinit.target.wants/; for i in *; do [ $i == \
systemd-tmpfiles-setup.service ] || rm -f $i; done); \
rm -f /lib/systemd/system/multi-user.target.wants/*;\
rm -f /etc/systemd/system/*.wants/*;\
rm -f /lib/systemd/system/local-fs.target.wants/*; \
rm -f /lib/systemd/system/sockets.target.wants/*udev*; \
rm -f /lib/systemd/system/sockets.target.wants/*initctl*; \
rm -f /lib/systemd/system/basic.target.wants/*;\
rm -f /lib/systemd/system/anaconda.target.wants/*;
rm -f /lib/systemd/system/multi-user.target.wants/*;\
rm -f /etc/systemd/system/*.wants/*;\
rm -f /lib/systemd/system/local-fs.target.wants/*; \
rm -f /lib/systemd/system/sockets.target.wants/*udev*; \
rm -f /lib/systemd/system/sockets.target.wants/*initctl*; \
rm -f /lib/systemd/system/basic.target.wants/*;\
rm -f /lib/systemd/system/anaconda.target.wants/*;

RUN yum install -y epel-release.noarch

# Install dependencies for rucio
RUN yum install -y \
gcc \
gridsite \
httpd \
krb5-devel \
libaio \
mod_auth_kerb \
mod_ssl \
mod_wsgi \
openssl-devel.x86_64 \
python-devel.x86_64 \
python-pip \
vim

# DB packages
# Oracle
RUN rpm -i /tmp/oic.rpm; \
echo "/usr/lib/oracle/12.1/client64/lib" >/etc/ld.so.conf.d/oracle.conf; \
ldconfig
# MySQL
RUN yum install -y MySQL-python

VOLUME [ "/sys/fs/cgroup" ]
CMD ["/usr/sbin/init"]

Binary file added etc/docker/cc7systemd/oic.rpm
Binary file not shown.
28 changes: 15 additions & 13 deletions etc/docker/daemons/Dockerfile
Expand Up @@ -7,31 +7,33 @@
# Authors:
# - Cedric Serfon, <cedric.serfon@cern.ch>, 2017


FROM rucio/rucio-systemd-cc7
ENV container docker


# Set the working directory to /app
WORKDIR /tmp

# Copy the current directory contents into the container at /app
ADD . /tmp

RUN yum install -y epel-release.noarch
RUN yum install -y python-pip krb5-devel httpd mod_ssl mod_auth_kerb mod_wsgi python-devel.x86_64 openssl-devel.x86_64 gridsite libaio
RUN rpm -i /tmp/oic.rpm
RUN echo "/usr/lib/oracle/12.1/client64/lib" >/etc/ld.so.conf.d/oracle.conf
RUN ldconfig
RUN yum install -y vim
RUN yum install -y gcc
RUN yum install -y httpd
RUN yum install -y MySQL-python
# Install Rucio
RUN pip install rucio
RUN yum install -y gfal2 gfal2-plugin-file gfal2-plugin-http gfal2-plugin-srm gfal2-python gfal2-plugin-gridftp gfal2-plugin-xrootd
RUN yum install -y supervisor

# Install dependecies
RUN yum install -y \
gfal2 \
gfal2-plugin-file \
gfal2-plugin-gridftp \
gfal2-plugin-http \
gfal2-plugin-srm \
gfal2-plugin-xrootd \
gfal2-python \
supervisor

RUN cp supervisord.conf /etc/supervisord.conf

VOLUME /var/log/rucio

RUN systemctl enable supervisord.service
CMD ["/usr/sbin/init"]

1 change: 0 additions & 1 deletion etc/docker/daemons/oic.rpm

This file was deleted.

19 changes: 5 additions & 14 deletions etc/docker/server/Dockerfile
Expand Up @@ -7,32 +7,23 @@
# Authors:
# - Cedric Serfon, <cedric.serfon@cern.ch>, 2017


FROM rucio/rucio-systemd-cc7
ENV container docker

# Set the working directory to /app
WORKDIR /tmp

# Copy the current directory contents into the container at /app
ADD . /tmp

RUN yum install -y epel-release.noarch
RUN yum install -y python-pip krb5-devel httpd mod_ssl mod_auth_kerb mod_wsgi python-devel.x86_64 openssl-devel.x86_64 gridsite libaio
RUN rpm -i /tmp/oic.rpm
RUN echo "/usr/lib/oracle/12.1/client64/lib" >/etc/ld.so.conf.d/oracle.conf
RUN ldconfig
RUN yum install -y vim
RUN yum install -y gcc
RUN yum install -y httpd
RUN yum install -y MySQL-python
RUN pip install rucio


VOLUME /var/log/httpd
RUN cp rucio.conf /etc/httpd/conf.d/rucio.conf; \
cp httpd.conf /etc/httpd/conf/httpd.conf; \
rm /etc/httpd/conf.d/ssl.conf /etc/httpd/conf.d/zgridsite.conf /etc/httpd/conf.d/welcome.conf /etc/httpd/conf.d/userdir.conf

RUN cp rucio.conf /etc/httpd/conf.d/rucio.conf
RUN cp httpd.conf /etc/httpd/conf/httpd.conf
RUN rm /etc/httpd/conf.d/ssl.conf /etc/httpd/conf.d/zgridsite.conf /etc/httpd/conf.d/welcome.conf /etc/httpd/conf.d/userdir.conf
VOLUME /var/log/httpd

RUN systemctl enable httpd.service
EXPOSE 443
Expand Down
1 change: 0 additions & 1 deletion etc/docker/server/oic.rpm

This file was deleted.

34 changes: 14 additions & 20 deletions etc/docker/ui/Dockerfile
@@ -1,36 +1,30 @@
# Copyright European Organization for Nuclear Research (CERN) 2017
#
# Licensed under the Apache License, Version 2.0 (the "License");
# You may not use this file except in compliance with the License.
# You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0
#
# Authors:
# - Cedric Serfon, <cedric.serfon@cern.ch>, 2017


FROM rucio/rucio-systemd-cc7
ENV container docker

# Set the working directory to /app
WORKDIR /tmp

# Copy the current directory contents into the container at /app
ADD . /tmp

RUN echo $HOSTNAME

RUN cat rucio.conf
RUN yum -y update
RUN yum clean all
RUN yum install -y epel-release.noarch
RUN yum install -y vim
RUN yum install -y gcc
RUN yum install -y httpd
RUN yum install -y python-pip krb5-devel httpd mod_ssl mod_auth_kerb mod_wsgi python-devel.x86_64 openssl-devel.x86_64 gridsite libaio

RUN pip install rucio_webui

RUN rpm -i /tmp/oic.rpm
RUN echo "/usr/lib/oracle/12.1/client64/lib" >/etc/ld.so.conf.d/oracle.conf
RUN ldconfig
RUN yum install -y MySQL-python

RUN cp rucio.conf /etc/httpd/conf.d/rucio.conf; \
cp httpd.conf /etc/httpd/conf/httpd.conf; \
rm /etc/httpd/conf.d/ssl.conf /etc/httpd/conf.d/zgridsite.conf /etc/httpd/conf.d/welcome.conf /etc/httpd/conf.d/userdir.conf

VOLUME /var/log/httpd

RUN cp rucio.conf /etc/httpd/conf.d/rucio.conf
RUN cp httpd.conf /etc/httpd/conf/httpd.conf
RUN rm /etc/httpd/conf.d/ssl.conf /etc/httpd/conf.d/zgridsite.conf /etc/httpd/conf.d/welcome.conf /etc/httpd/conf.d/userdir.conf

RUN systemctl enable httpd.service
EXPOSE 443
CMD ["/usr/sbin/init"]
Expand Down
1 change: 0 additions & 1 deletion etc/docker/ui/oic.rpm

This file was deleted.

0 comments on commit d540361

Please sign in to comment.