23 lines
329 B
Docker
23 lines
329 B
Docker
|
FROM golang:alpine as builder
|
||
|
|
||
|
WORKDIR /app
|
||
|
|
||
|
COPY . .
|
||
|
|
||
|
RUN apk add git
|
||
|
|
||
|
RUN CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build -ldflags="-w -s" .
|
||
|
|
||
|
RUN ls /app
|
||
|
|
||
|
FROM scratch
|
||
|
|
||
|
WORKDIR /app
|
||
|
|
||
|
COPY --from=builder /app/oc-discovery /usr/bin/
|
||
|
COPY docker_aggregator.json /etc/oc/aggregator.json
|
||
|
|
||
|
EXPOSE 8080
|
||
|
|
||
|
ENTRYPOINT ["oc-aggregator"]
|