Created
January 23, 2019 09:00
-
-
Save ofrzeta/3bb08efc79f4c33fa267835b72bc96f6 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 | |
COPY --from=builder /bin/ash /bin/ash | |
COPY --from=builder /bin/sleep /bin/sleep | |
EXPOSE 9093 | |
EXPOSE 9094 | |
ENTRYPOINT /bin/sleep 24d | |
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