Skip to content
Permalink
Browse files

Add geodns-logs to Docker image

  • Loading branch information
abh committed Dec 28, 2019
1 parent f8143b8 commit 6da29339d275799a80514643af7518bfcbecfe15
Showing with 29 additions and 8 deletions.
  1. +24 −6 Dockerfile
  2. +5 −2 build
@@ -1,16 +1,34 @@
FROM golang:1.12.3-alpine3.9 as build
FROM golang:1.13.5-alpine3.10 as build

RUN apk add --no-cache git tar

RUN apk add --no-cache git
WORKDIR /go/src/github.com/abh/geodns

ENV CGO_ENABLED=0

ADD . .
ADD vendor/ vendor/
ADD applog/ applog/
ADD countries/ countries/
ADD geodns-logs/ geodns-logs/
ADD health/ health/
ADD monitor/ monitor/
ADD querylog/ querylog/
ADD server/ server/
ADD targeting/ targeting/
ADD typeutil/ typeutil/
ADD zones/ zones/
ADD service/ service/
ADD service-logs/ service-logs/
ADD .git/ .git/
ADD *.go build ./

RUN go get -d -v ./...
RUN go build -o /geodns
RUN ./build
RUN ls -l
RUN ls -l dist

RUN ln dist/* /

FROM scratch
COPY --from=build /geodns /geodns
COPY --from=build /geodns-linux-amd64 /geodns
COPY --from=build /geodns-logs-linux-amd64 /geodns-logs
ENTRYPOINT ["/geodns"]
7 build
@@ -17,7 +17,10 @@ go build -o dist/geodns-$OS-$ARCH \
-ldflags "-X main.gitVersion=$REVISION -X main.buildTime=$BUILDTIME" \
-v && \
(cd geodns-logs && go build -v -o ../dist/geodns-logs-$OS-$ARCH && cd ..) && \
cd dist && \
tar -cvHf geodns-$OS-$ARCH.tar \
cd dist && \
rm -f service service-logs && \
ln -s ../service . && \
ln -s ../service-logs . && \
tar -cvhf geodns-$OS-$ARCH.tar \
--exclude \*~ geodns-$OS-$ARCH \
geodns-logs-$OS-$ARCH service service-logs

0 comments on commit 6da2933

Please sign in to comment.
You can’t perform that action at this time.