From debc32120b1d62b467cc2ae22c5a4f248e43a66f Mon Sep 17 00:00:00 2001 From: Jakub Kadlcik Date: Jun 03 2019 08:37:49 +0000 Subject: [docker] run copr-frontend command as non-root user It is now not possible to run copr-frontend command (aka manage.py) as root. Hence, run it as `copr-fe` --- diff --git a/docker/frontend/Dockerfile b/docker/frontend/Dockerfile index 110b84f..2dd4d97 100644 --- a/docker/frontend/Dockerfile +++ b/docker/frontend/Dockerfile @@ -10,6 +10,7 @@ RUN dnf -y update && \ wget \ vim \ yum \ + sudo \ supervisor \ copr-selinux \ python3-alembic \ diff --git a/docker/frontend/files/usr/bin/run.sh b/docker/frontend/files/usr/bin/run.sh index 61bb1bd..7e144ba 100755 --- a/docker/frontend/files/usr/bin/run.sh +++ b/docker/frontend/files/usr/bin/run.sh @@ -4,8 +4,8 @@ export LANG=en_US.UTF-8 /usr/bin/supervisord -c /etc/supervisord.conf -cd /usr/share/copr/coprs_frontend/ && python3 ./manage.py create_db --alembic alembic.ini -python3 /usr/share/copr/coprs_frontend/manage.py create_chroot fedora-{26,27,rawhide}-{i386,x86_64} epel-{6,7}-x86_64 epel-6-i386 +cd /usr/share/copr/coprs_frontend/ && sudo -u copr-fe copr-frontend create_db --alembic alembic.ini +sudo -u copr-fe copr-frontend create_chroot fedora-{26,27,rawhide}-{i386,x86_64} epel-{6,7}-x86_64 epel-6-i386 # selinux: make data dir writeable for httpd