Skip to content
Snippets Groups Projects
Commit 9b955a31 authored by schmitz's avatar schmitz
Browse files

some fixes for centos dockerfile

parent 636421cf
No related branches found
No related tags found
No related merge requests found
FROM centos:latest FROM centos:7
ENV LC_ALL C.utf8 ENV LC_ALL en_US.utf8
RUN yum -y install procps RUN yum -y install procps
......
...@@ -4,11 +4,13 @@ ...@@ -4,11 +4,13 @@
# with Celery, Redis, and sqlite. # with Celery, Redis, and sqlite.
# #
set -e
echo "Installing epel repo" echo "Installing epel repo"
rpm -Uh https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm rpm -Uh https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm
echo "Installing remi repo" echo "Installing remi repo"
yum -q -y install http://rpms.remirepo.net/enterprise/remi-release-7.rpm yum -y install http://rpms.remirepo.net/enterprise/remi-release-7.rpm
echo "Installing base dependencies" echo "Installing base dependencies"
yum -y install python36 python3-setuptools python36-virtualenv vim git gcc libevent-devel libxml2-devel libxslt-devel mariadb-server mysql-devel patch yum-utils yum -y install python36 python3-setuptools python36-virtualenv vim git gcc libevent-devel libxml2-devel libxslt-devel mariadb-server mysql-devel patch yum-utils
...@@ -23,23 +25,26 @@ echo "Setup python environment for FoD" ...@@ -23,23 +25,26 @@ echo "Setup python environment for FoD"
mkdir -p /var/log/fod /srv mkdir -p /var/log/fod /srv
virtualenv-3 /srv/venv virtualenv-3 /srv/venv
( (
set +e
source /srv/venv/bin/activate source /srv/venv/bin/activate
mkdir -p /srv/flowspy/ mkdir -p /srv/flowspy/
# Select source dir and copy FoD into /srv/flowspy/ # Select source dir and copy FoD into /srv/flowspy/
if [ "`basename "$0"`" = install-centos.sh ]; then if [ "`basename "$0"`" = install-centos.sh ]; then
# this script is in the source directory # this script is in the source directory
cp -r "`dirname $0`"/* /srv/flowspy/ cp -f -r "`dirname $0`"/* /srv/flowspy/
elif [ -e /vagrant ]; then elif [ -e /vagrant ]; then
# vagrant's copy in /vagrant/ # vagrant's copy in /vagrant/
cp -r /vagrant/* /srv/flowspy/ cp -f -r /vagrant/* /srv/flowspy/
elif [ -e ./install-centos.sh ]; then elif [ -e ./install-centos.sh ]; then
# current directory is with the sourcecode # current directory is with the sourcecode
cp -r ./* /srv/flowspy/ cp -f -r ./* /srv/flowspy/
else else
echo "Could not find FoD src directory tried `dirname $0`, /vagrant/, ./" echo "Could not find FoD src directory tried `dirname $0`, /vagrant/, ./"
exit 1 exit 1
fi fi
set -e
cd /srv/flowspy/ cd /srv/flowspy/
( (
...@@ -51,7 +56,7 @@ virtualenv-3 /srv/venv ...@@ -51,7 +56,7 @@ virtualenv-3 /srv/venv
touch flowspy/settings_local.py touch flowspy/settings_local.py
./manage.py syncdb --noinput #./manage.py syncdb --noinput
./manage.py migrate ./manage.py migrate
./manage.py loaddata initial_data ./manage.py loaddata initial_data
) )
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment