Created
December 6, 2018 11:06
-
-
Save Reamer/d1393d42249b328fc17e0cb6863a38f5 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--- | |
kind: "BuildConfig" | |
apiVersion: "v1" | |
metadata: | |
name: "mytestbuild" | |
spec: | |
runPolicy: "Serial" | |
source: | |
dockerfile: |- | |
FROM golang:alpine AS builder | |
ENV alertmanager_version v0.15.3 | |
RUN apk -U add binutils git make && \ | |
mkdir -p $GOPATH/src/github.com/prometheus && \ | |
cd $GOPATH/src/github.com/prometheus && \ | |
git clone https://github.com/prometheus/alertmanager.git && \ | |
cd alertmanager && \ | |
git checkout ${alertmanager_version} && \ | |
make build | |
FROM alpine | |
WORKDIR /alertmanager | |
COPY --from=builder /go/src/github.com/prometheus/alertmanager/alertmanager /bin/alertmanager | |
COPY --from=builder /go/src/github.com/prometheus/alertmanager/amtool /bin/amtool | |
EXPOSE 9093 | |
EXPOSE 9094 | |
ENTRYPOINT ["/bin/alertmanager"] | |
CMD ["--help" | |
strategy: | |
dockerStrategy: | |
noCache: true | |
output: | |
to: | |
kind: "ImageStreamTag" | |
name: mytestbuildimage:v0.15.3 | |
--- | |
apiVersion: image.openshift.io/v1 | |
kind: ImageStream | |
metadata: | |
name: mytestbuildimage | |
spec: | |
lookupPolicy: | |
local: false |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment