24 lines
549 B
Docker
24 lines
549 B
Docker
|
ARG REPO=library
|
||
|
# Builder
|
||
|
FROM golang:1.14 AS builder
|
||
|
|
||
|
RUN apt-get update && apt-get install -y --no-install-recommends git dmsetup && apt-get clean
|
||
|
|
||
|
ARG SRC_DIR=./src/cadvisor-master
|
||
|
COPY ${SRC_DIR} /go/src/github.com/google/cadvisor
|
||
|
|
||
|
WORKDIR /go/src/github.com/google/cadvisor
|
||
|
|
||
|
ARG GOARCH=amd64
|
||
|
ENV GOARCH=${GOARCH}
|
||
|
RUN make build # release
|
||
|
|
||
|
FROM ${REPO}/alpine:3.10
|
||
|
|
||
|
COPY --from=builder /go/src/github.com/google/cadvisor/cadvisor /usr/bin/cadvisor
|
||
|
|
||
|
EXPOSE 8080
|
||
|
ENTRYPOINT ["/usr/bin/cadvisor", "-logtostderr"]
|
||
|
|
||
|
# vim: set filetype=dockerfile:
|