-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
19 lines (19 loc) · 864 Bytes
/
Copy pathDockerfile
File metadata and controls
19 lines (19 loc) · 864 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
##################################################################
# Build binary.
##################################################################
FROM golang:1.12.9 as build
WORKDIR /go/src/github.com/ticketmaster/TMNET-avi_exporter
ADD . .
RUN make build-linux
##################################################################\
# Build non-root container.
##################################################################
FROM alpine:latest
EXPOSE 8080
RUN addgroup -g 1000 aviexporter &&\
adduser aviexporter -D aviexporter -u 1000 -G aviexporter
USER 1000:1000
COPY --from=build /go/src/github.com/ticketmaster/TMNET-avi_exporter/target/linux/aviexporter /home/aviexporter/aviexporter
COPY --from=build /go/src/github.com/ticketmaster/TMNET-avi_exporter/lib /home/aviexporter/lib
WORKDIR /home/aviexporter
ENTRYPOINT ["/home/aviexporter/aviexporter"]