-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
42 lines (30 loc) · 986 Bytes
/
Dockerfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
FROM golang:1.13.4-alpine as base
RUN apk --no-cache add ca-certificates make git g++
ENV GO111MODULE on
#get source
WORKDIR /go/src/github.com/sjeandeaux/access-log-monitor
#copy the source
COPY . .
RUN make tools
RUN make dependencies
## test
FROM base AS test
RUN make test
#Build the application
FROM base AS build
RUN make build
FROM scratch AS release
ARG BUILD_VERSION=undefined
ARG BUILD_DATE=undefined
ARG VCS_REF=undefined
#http://label-schema.org/rc1/
LABEL "maintainer"="stephane.jeandeaux@gmail.com" \
"org.label-schema.vendor"="sjeandeaux" \
"org.label-schema.schema-version"="1.0.0-rc.1" \
"org.label-schema.applications.access-log-monitor.version"=${BUILD_VERSION} \
"org.label-schema.vcs-ref"=$VCS_REF \
"org.label-schema.build-date"=${BUILD_DATE}
COPY --from=build /go/src/github.com/sjeandeaux/access-log-monitor/target/access-log-monitor /access-log-monitor
VOLUME [ "/tmp" ]
CMD ["watch"]
ENTRYPOINT ["/access-log-monitor"]