diff --git a/Dockerfile.rhel b/Dockerfile.rhel index 5950c86965..ce1a4357ec 100644 --- a/Dockerfile.rhel +++ b/Dockerfile.rhel @@ -1,7 +1,7 @@ FROM registry.svc.ci.openshift.org/ocp/builder:golang-1.10 AS builder -ENV ALERTMANAGER_GOPATH=/go/src/github.com/prometheus/alertmanager -ENV BUILD_PROMU=false +ARG ALERTMANAGER_GOPATH=/go/src/github.com/prometheus/alertmanager +ARG BUILD_PROMU=false COPY . ${ALERTMANAGER_GOPATH} RUN cd ${ALERTMANAGER_GOPATH} && \ yum install -y prometheus-promu && \ @@ -14,12 +14,13 @@ LABEL io.k8s.display-name="OpenShift Prometheus Alert Manager" \ io.openshift.tags="prometheus,monitoring" \ maintainer="OpenShift Development " -ENV ALERTMANAGER_GOPATH=/go/src/github.com/prometheus/alertmanager +ARG ALERTMANAGER_GOPATH=/go/src/github.com/prometheus/alertmanager COPY --from=builder ${ALERTMANAGER_GOPATH}/amtool /bin/amtool COPY --from=builder ${ALERTMANAGER_GOPATH}/alertmanager /bin/alertmanager COPY --from=builder ${ALERTMANAGER_GOPATH}/examples/ha/alertmanager.yml /etc/alertmanager/alertmanager.yml EXPOSE 9093 +RUN mkdir -p /alertmanager VOLUME [ "/alertmanager" ] WORKDIR /etc/alertmanager ENTRYPOINT [ "/bin/alertmanager" ]