Browse Source

Initial dockerfile

master
Chris Smith 5 years ago
commit
6750593639
1 changed files with 15 additions and 0 deletions
  1. 15
    0
      Dockerfile

+ 15
- 0
Dockerfile View File

@@ -0,0 +1,15 @@
1
+FROM golang:alpine AS build
2
+
3
+WORKDIR /usr/local/go/src/github.com/google/mtail
4
+
5
+RUN apk add build-base git \
6
+    && git clone https://github.com/google/mtail . \
7
+    && make install_deps \
8
+    && CGO_ENABLED=0 GOOS=linux go build -o /usr/bin/mtail -a -ldflags '-extldflags "-static"' ./cmd/mtail
9
+
10
+FROM scratch
11
+
12
+COPY --from=build /usr/bin/mtail /mtail
13
+
14
+EXPOSE 3903
15
+ENTRYPOINT ["/mtail", "-logtostderr"]

Loading…
Cancel
Save