Skip to content

Instantly share code, notes, and snippets.

@Reamer
Created December 6, 2018 11:06
Show Gist options
  • Star 2 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Reamer/d1393d42249b328fc17e0cb6863a38f5 to your computer and use it in GitHub Desktop.
Save Reamer/d1393d42249b328fc17e0cb6863a38f5 to your computer and use it in GitHub Desktop.
---
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