Layer a deployment image ontop of the waiverdb candidate-registry image.

This commit is contained in:
Ralph Bean 2017-11-07 01:56:19 +00:00
parent 46a505414b
commit c6cea79a7c
2 changed files with 33 additions and 3 deletions

View file

@ -0,0 +1,30 @@
apiVersion: v1
kind: BuildConfig
metadata:
name: "waiverdb-docker-build"
labels:
environment: "waiverdb"
spec:
runPolicy: Serial
# This docker build exists only to layer some links ontop of the base waiverdb
# image from candidate-registry.fedoraproject.org
source:
dockerfile: |-
FROM waiverdb:latest
USER 0
RUN dnf -y install --setopt=tsflags=nodocs fedmsg && dnf -y clean all
# create a symlink for configuring fedmsg.
RUN ln -sfn /etc/fedmsg-waiverdb.d/waiverdb.py /etc/fedmsg.d/zz_waiverdb.py
# And another two for putting the certs in place.
RUN mkdir -p /etc/pki/fedmsg/
RUN ln -sf /etc/pki/fedmsg/key/fedmsg-waiverdb.key /etc/pki/fedmsg/waiverdb.key
RUN ln -sf /etc/pki/fedmsg/crt/fedmsg-waiverdb.crt /etc/pki/fedmsg/waiverdb.crt
# Make sure fedmsg can write its CRL.
RUN chmod 777 /var/run/fedmsg/
USER 1001
strategy:
type: Docker
output:
to:
kind: ImageStreamTag
name: waiverdb-deployment:latest

View file

@ -19,7 +19,7 @@ spec:
spec:
containers:
- name: web
image: waiverdb
image: waiverdb-deployment
ports:
- containerPort: 8080
volumeMounts:
@ -27,7 +27,7 @@ spec:
mountPath: /etc/waiverdb
readOnly: true
- name: fedmsg-config-volume
mountPath: /etc/fedmsg.d
mountPath: /etc/fedmsg-waiverdb.d
readOnly: true
- name: secret-volume
mountPath: /etc/secret
@ -88,5 +88,5 @@ spec:
- web
from:
kind: ImageStreamTag
name: waiverdb:latest
name: waiverdb-deployment:latest
- type: ConfigChange