[damned-lies/oscp] Migrate to CentOS 8 + python39
- From: Andrea Veri <averi src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [damned-lies/oscp] Migrate to CentOS 8 + python39
- Date: Tue, 8 Jun 2021 13:24:20 +0000 (UTC)
commit dc188cfce4c49ac272e37f4d367b3a98481e6473
Author: Andrea Veri <averi redhat com>
Date: Tue Jun 8 15:24:13 2021 +0200
Migrate to CentOS 8 + python39
httpd/Dockerfile | 37 +++++++++++++++----------------------
httpd/entrypoint.sh | 2 +-
2 files changed, 16 insertions(+), 23 deletions(-)
---
diff --git a/httpd/Dockerfile b/httpd/Dockerfile
index 62e7e480..3bb612ae 100644
--- a/httpd/Dockerfile
+++ b/httpd/Dockerfile
@@ -1,41 +1,34 @@
-FROM centos/s2i-base-centos7
+FROM centos/s2i-base-centos8
USER root
-RUN INSTALL_PKGS="rh-python36 rh-python36-python-devel rh-python36-python-setuptools rh-python36-python-pip
nss_wrapper rh-python36-mod_wsgi \
- httpd24 httpd24-httpd-devel httpd24-mod_ssl httpd24-mod_auth_kerb httpd24-mod_ldap \
- httpd24-mod_session atlas-devel gcc-c++ gcc-gfortran libffi-devel libtool-ltdl enchant wget \
- gettext gnome-doc-utils intltool itstool libicu-devel libxml2-devel mariadb-devel subversion \
- translate-toolkit yelp-tools" && \
- yum install -y centos-release-scl epel-release && \
- yum -y --setopt=tsflags=nodocs install --enablerepo=centosplus $INSTALL_PKGS && \
+RUN INSTALL_PKGS="python39 python39-devel python39-setuptools python39-pip python39-mod_wsgi python39-lxml \
+ httpd httpd-devel mod_ldap mod_session \
+ atlas-devel gcc-c++ gcc-gfortran libffi-devel libtool-ltdl enchant wget \
+ gettext gnome-doc-utils intltool itstool libicu-devel mariadb-devel subversion yelp-tools" && \
+ yum update -y && \
+ yum install -y epel-release && \
+ yum -y --setopt=tsflags=nodocs install $INSTALL_PKGS && \
# Remove centos-logos (httpd dependency) to keep image size smaller.
- rpm -e --nodeps centos-logos && \
yum -y clean all --enablerepo='*'
-RUN sed -ri ' s!^(\s*CustomLog)\s+\S+!\1 /proc/self/fd/1!g; s!^(\s*ErrorLog)\s+\S+!\1 /proc/self/fd/2!g;'
/opt/rh/httpd24/root/etc/httpd/conf/httpd.conf && \
- sed -ri ' s!^(\s*CustomLog)\s+\S+!\1 /proc/self/fd/1!g; s!^(\s*TransferLog)\s+\S+!\1 /proc/self/fd/1!g;
s!^(\s*ErrorLog)\s+\S+!\1 /proc/self/fd/2!g;' /opt/rh/httpd24/root/etc/httpd/conf.d/ssl.conf && \
- rm -f /opt/rh/httpd24/root/etc/httpd/conf.d/mod_security.conf
+RUN sed -ri ' s!^(\s*CustomLog)\s+\S+!\1 /proc/self/fd/1!g; s!^(\s*ErrorLog)\s+\S+!\1 /proc/self/fd/2!g;'
/etc/httpd/conf/httpd.conf && \
+ rm -f /etc/httpd/conf.d/mod_security.conf
-RUN sed -i 's/Listen\ 80/Listen\ 8080/' /opt/rh/httpd24/root/etc/httpd/conf/httpd.conf && \
- sed -i 's/Listen\ 443/Listen\ 8443/' /opt/rh/httpd24/root/etc/httpd/conf.d/ssl.conf && \
- sed -i 's/_default_:443/_default_:8443/' /opt/rh/httpd24/root/etc/httpd/conf.d/ssl.conf
+RUN sed -i 's/Listen\ 80/Listen\ 8080/' /etc/httpd/conf/httpd.conf
RUN groupadd l10n -g 1000660000 && \
useradd l10n -g 1000660000 -u 1000660000 -G apache -r -l -m && \
- chown l10n:l10n /etc/pki/tls/certs/localhost.crt /etc/pki/tls/private/localhost.key && \
- chown l10n:l10n /opt/rh/httpd24/root/var/run/httpd && \
+ chown l10n:l10n /var/run/httpd && \
mkdir -p /l10n && \
- git clone --depth 1 --branch master --single-branch
https://gitlab.gnome.org/Infrastructure/damned-lies.git /l10n/damnedlies
+ git clone --depth 1 --branch testing --single-branch
https://gitlab.gnome.org/Infrastructure/damned-lies.git /l10n/damnedlies
ADD local_settings.py /l10n/damnedlies/damnedlies/local_settings.py
-ADD l10n.gnome.org.conf /opt/rh/httpd24/root/etc/httpd/conf.d/l10n.gnome.org.conf
+ADD l10n-testing.openshift.gnome.org.conf /etc/httpd/conf.d/l10n-testing.openshift.gnome.org.conf
RUN chown -R l10n:l10n /l10n
USER l10n
-SHELL ["/usr/bin/scl", "enable", "rh-python36"]
WORKDIR /l10n/damnedlies
-RUN virtualenv /l10n/venv && \
+RUN python3.9 -m venv /l10n/venv && \
/l10n/venv/bin/pip install -r requirements.txt
ADD entrypoint.sh /entrypoint.sh
ENTRYPOINT ["/entrypoint.sh"]
-CMD ["httpd", "-DFOREGROUND"]
diff --git a/httpd/entrypoint.sh b/httpd/entrypoint.sh
index df40c527..b3797ba5 100755
--- a/httpd/entrypoint.sh
+++ b/httpd/entrypoint.sh
@@ -24,4 +24,4 @@ echo 'Generating static files'
echo 'Compiling translations'
/l10n/venv/bin/python manage.py compile-trans
-scl enable rh-python36 httpd24 "$*"
+exec httpd -DFOREGROUND
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]