2023-04-21 17:34:11 +02:00
|
|
|
FROM fedora:38
|
2018-11-21 00:01:51 +01:00
|
|
|
|
2020-01-03 17:52:23 +01:00
|
|
|
RUN curl -sSL -o /etc/yum.repos.d/yarn.repo https://dl.yarnpkg.com/rpm/yarn.repo \
|
|
|
|
&& dnf -y --setopt=install_weak_deps=False install \
|
2023-04-21 17:34:11 +02:00
|
|
|
nodejs-npm \
|
2018-11-21 00:01:51 +01:00
|
|
|
python3-ldap \
|
2023-02-24 00:40:12 +01:00
|
|
|
python3-lxml \
|
2018-11-21 00:01:51 +01:00
|
|
|
python3-mysql \
|
2020-01-03 17:52:23 +01:00
|
|
|
python3-pip \
|
2023-02-24 00:40:12 +01:00
|
|
|
python3-saml \
|
2021-01-22 14:22:50 +01:00
|
|
|
python3-setuptools \
|
2023-04-21 17:34:11 +02:00
|
|
|
python3-wheel \
|
2018-11-21 00:01:51 +01:00
|
|
|
python3-xmlsec \
|
|
|
|
uwsgi \
|
|
|
|
yarn \
|
|
|
|
&& dnf clean all
|
|
|
|
|
|
|
|
RUN mkdir -p /opt/powerdns-admin \
|
2023-04-21 17:34:11 +02:00
|
|
|
&& curl -sSL https://github.com/PowerDNS-Admin/PowerDNS-Admin/archive/refs/tags/v0.4.1.tar.gz \
|
2018-11-21 00:01:51 +01:00
|
|
|
| tar -xzC /opt/powerdns-admin --strip 1 \
|
2023-02-24 00:40:12 +01:00
|
|
|
&& sed -i '/lxml/d' /opt/powerdns-admin/requirements.txt \
|
2023-04-21 17:34:11 +02:00
|
|
|
&& sed -i '/mysqlclient/d' /opt/powerdns-admin/requirements.txt \
|
|
|
|
&& sed -i '/psycopg2/d' /opt/powerdns-admin/requirements.txt \
|
|
|
|
&& sed -i '/python-ldap/d' /opt/powerdns-admin/requirements.txt \
|
2023-02-24 00:40:12 +01:00
|
|
|
&& sed -i '/python3-saml/d' /opt/powerdns-admin/requirements.txt \
|
2020-01-03 17:52:23 +01:00
|
|
|
&& chown -R root: /opt/powerdns-admin
|
2018-11-21 00:01:51 +01:00
|
|
|
|
|
|
|
WORKDIR /opt/powerdns-admin
|
|
|
|
|
2023-04-21 18:57:16 +02:00
|
|
|
RUN pip3 install --no-cache-dir envtpl python-dotenv \
|
2018-11-21 00:01:51 +01:00
|
|
|
&& pip3 install -r requirements.txt --no-cache-dir
|
|
|
|
|
2020-01-08 01:07:16 +01:00
|
|
|
ENV FLASK_APP=/opt/powerdns-admin/powerdnsadmin/__init__.py
|
2018-11-21 00:01:51 +01:00
|
|
|
|
|
|
|
COPY config.py.tpl /
|
2020-01-08 01:07:16 +01:00
|
|
|
COPY run.py .
|
2018-11-21 00:01:51 +01:00
|
|
|
|
|
|
|
RUN envtpl < /config.py.tpl > /opt/powerdns-admin/config.py \
|
|
|
|
&& sed -i '/SQLALCHEMY_DATABASE_URI/d' /opt/powerdns-admin/config.py
|
|
|
|
|
2020-01-03 17:52:23 +01:00
|
|
|
RUN yarn install --pure-lockfile --production \
|
|
|
|
&& yarn cache clean \
|
2018-11-21 00:01:51 +01:00
|
|
|
&& flask assets build \
|
2023-04-21 17:34:11 +02:00
|
|
|
&& chown -R uwsgi: /opt/powerdns-admin/powerdnsadmin/static/.webassets-cache
|