mirror of
https://pagure.io/fm-orchestrator.git
synced 2026-02-03 05:03:43 +08:00
76 lines
2.4 KiB
Docker
76 lines
2.4 KiB
Docker
FROM registry.fedoraproject.org/fedora:latest AS builder
|
|
|
|
ARG DNF_CMD="dnf -y --setopt=deltarpm=0 --setopt=install_weak_deps=false --setopt=tsflags=nodocs"
|
|
|
|
COPY . /src
|
|
WORKDIR /src
|
|
|
|
RUN $DNF_CMD install \
|
|
python3-setuptools python3-wheel && \
|
|
$DNF_CMD clean all
|
|
RUN python3 setup.py bdist_wheel -u root -g root
|
|
|
|
FROM registry.fedoraproject.org/fedora:latest
|
|
|
|
ARG DNF_CMD="dnf -y --setopt=deltarpm=0 --setopt=install_weak_deps=false --setopt=tsflags=nodocs"
|
|
ARG EXTRA_RPMS=""
|
|
|
|
LABEL \
|
|
org.opencontainers.image.title="Backend for the Module Build Service (MBS)" \
|
|
org.opencontainers.image.description="The MBS coordinates module builds. This image is to serve as the MBS backend." \
|
|
org.opencontainers.image.vendor="The Brew Guild" \
|
|
org.opencontainers.image.authors="The Brew Guild <brew-devel@redhat.com>" \
|
|
org.opencontainers.image.licenses="MIT" \
|
|
org.opencontainers.image.url="https://pagure.io/fm-orchestrator" \
|
|
org.opencontainers.image.documentation="https://pagure.io/fm-orchestrator" \
|
|
distribution-scope="public"
|
|
|
|
COPY --from=builder /src/dist /src/dist
|
|
|
|
RUN $DNF_CMD install \
|
|
python3-celery \
|
|
python3-click \
|
|
python3-distro \
|
|
python3-dnf \
|
|
python3-docopt \
|
|
python3-dogpile-cache \
|
|
python3-fedmsg \
|
|
python3-flask \
|
|
python3-flask-migrate \
|
|
python3-flask-sqlalchemy \
|
|
python3-kobo \
|
|
python3-kobo-rpmlib \
|
|
python3-koji \
|
|
python3-ldap3 \
|
|
python3-libmodulemd \
|
|
python3-m2crypto \
|
|
python3-moksha-hub \
|
|
python3-munch \
|
|
python3-openidc-client \
|
|
python3-packaging \
|
|
python3-pip \
|
|
python3-prometheus_client \
|
|
python3-psycopg2 \
|
|
python3-pungi \
|
|
python3-pyOpenSSL \
|
|
python3-pyparsing \
|
|
python3-requests \
|
|
python3-service-identity \
|
|
python3-six \
|
|
python3-solv \
|
|
python3-sqlalchemy \
|
|
git-core \
|
|
rpm-build \
|
|
$EXTRA_RPMS && \
|
|
rm -f /etc/fedmsg.d/* && \
|
|
$DNF_CMD clean all
|
|
# Install locally available python wheels only.
|
|
# Any new/updated dependencies should be installed via rpm.
|
|
RUN pip-3 install --no-deps /src/dist/*.whl
|
|
RUN mkdir /etc/mbs-messaging-umb && ln -s $(pip-3 show mbs_messaging_umb | awk '/^Location:/ {print $2}')/etc/mbs-messaging-umb/config.py /etc/mbs-messaging-umb/config.py
|
|
|
|
USER 1001
|
|
|
|
VOLUME ["/etc/module-build-service", "/etc/fedmsg.d", "/etc/mbs-certs"]
|
|
CMD ["fedmsg-hub-3"]
|