Add ipv6 support and enable go mod

This commit is contained in:
Mayuresh Gaitonde
2019-04-24 11:21:22 -07:00
parent e15172111e
commit e729608b90
11 changed files with 467 additions and 177 deletions

View File

@@ -1,20 +1,24 @@
FROM golang:alpine as builder
FROM golang:1.12-alpine as builder
ENV GO111MODULE=on
RUN apk update && \
apk upgrade && \
apk add --no-cache git && \
apk add make
RUN mkdir -p /opt/gocast
RUN mkdir -p /go/src/github.com/mayuresh82
RUN cd /go/src/github.com/mayuresh82 && \
git clone https://github.com/mayuresh82/gocast
RUN mkdir -p /go/src/github.com/mayuresh82/gocast
COPY . /go/src/github.com/mayuresh82/gocast
WORKDIR /go/src/github.com/mayuresh82/gocast
RUN go mod download
RUN make
RUN cp gocast /opt/gocast/
FROM alpine:latest
RUN apk --no-cache add ca-certificates bash iptables netcat-openbsd sudo
WORKDIR /root/
COPY --from=builder /opt/gocast/gocast .
COPY --from=builder /go/src/github.com/mayuresh82/gocast .
EXPOSE 8080/tcp