| |
@@ -1,38 +1,41 @@
|
| |
# This will produce an image to be used in Openshift
|
| |
# Build should be triggered from repo root like:
|
| |
- # docker build -f openshift/Dockerfile --tag 172.30.1.1:5000/myproject/resultsdb:latest --build-arg resultsdb_rpm=resultsdb-2.0.2-1.fc25.noarch.rpm .
|
| |
+ # docker build -f openshift/Dockerfile \
|
| |
+ # --tag <IMAGE_TAG> \
|
| |
+ # --build-arg resultsdb_rpm=<RESULTSDB_RPM> ./
|
| |
|
| |
- FROM registry.fedoraproject.org/f27/httpd:latest
|
| |
+ FROM fedora:28
|
| |
LABEL \
|
| |
name="ResultsDB application" \
|
| |
vendor="ResultsDB developers" \
|
| |
license="GPLv2+" \
|
| |
+ description="ResultsDB is a results store engine for, but not limited to, Fedora QA tools." \
|
| |
+ usage="https://pagure.io/taskotron/resultsdb/blob/develop/f/openshift/README.md" \
|
| |
build-date=""
|
| |
|
| |
- USER 0
|
| |
-
|
| |
- # The caller should build a resultsdb RPM package using and then pass it in this arg.
|
| |
+ # The caller should build a resultsdb RPM package used and then pass it in this arg.
|
| |
+ # Accept both a URL or a local path relative to the build context.
|
| |
ARG resultsdb_rpm
|
| |
- COPY $resultsdb_rpm /tmp
|
| |
+ ADD $resultsdb_rpm /tmp
|
| |
|
| |
- RUN yum -y update \
|
| |
- && yum -y install --setopt=tsflags=nodocs \
|
| |
+ RUN dnf -y update \
|
| |
+ && dnf -y install --setopt=tsflags=nodocs \
|
| |
python-psycopg2 \
|
| |
- httpd-devel \
|
| |
- python-devel \
|
| |
- gcc \
|
| |
- python2-pip \
|
| |
+ httpd \
|
| |
+ mod_wsgi \
|
| |
/tmp/$(basename $resultsdb_rpm) \
|
| |
- && yum clean all \
|
| |
+ && dnf clean all \
|
| |
&& rm -f /tmp/$(basename $resultsdb_rpm)
|
| |
|
| |
- # This is installed from pypi, in order to get
|
| |
- # mod_wsgi-express.
|
| |
- RUN pip install mod_wsgi
|
| |
-
|
| |
- COPY openshift/run_app.sh /usr/bin/run_app
|
| |
- RUN chmod 770 /usr/bin/run_app
|
| |
-
|
| |
- USER 1001
|
| |
- EXPOSE 5001
|
| |
- ENTRYPOINT run_app
|
| |
+ EXPOSE 5001/tcp
|
| |
+ VOLUME ["/etc/resultsdb", "/etc/httpd/conf.d"]
|
| |
+ ENTRYPOINT ["mod_wsgi-express", "start-server", "/usr/share/resultsdb/resultsdb.wsgi"]
|
| |
+ CMD [\
|
| |
+ "--user", "apache", "--group", "apache", \
|
| |
+ "--port", "5001", "--threads", "5", \
|
| |
+ "--include-file", "/etc/httpd/conf.d/resultsdb.conf", \
|
| |
+ "--log-level", "info", \
|
| |
+ "--log-to-terminal", \
|
| |
+ "--access-log", \
|
| |
+ "--startup-log" \
|
| |
+ ]
|
| |
This is part of the work to create container images suitable for integration testing:
@dcallagh ptal