Closed laszbalo closed 5 years ago
I was able to build it with the following Dockerfile:
FROM golang:1.12-alpine as build-base
RUN apk update && apk upgrade && \
apk add --no-cache bash git openssh make bzr
ADD . /go/src/github.com/liftbridge-io/liftbridge
WORKDIR /go/src/github.com/liftbridge-io/liftbridge
ENV GO111MODULE on
RUN go get
RUN GOOS=linux GOARCH=amd64 go build
FROM alpine:latest
COPY --from=build-base /go/src/github.com/liftbridge-io/liftbridge/liftbridge /usr/local/bin/liftbridge
EXPOSE 9292
VOLUME "/tmp/liftbridge/liftbridge-default"
ENTRYPOINT ["liftbridge"]
Yeah, it looks like the Dockerfile needs to be updated since switching to Go modules. I will get that fixed up or if you'd like feel free to make a PR. Sorry for the inconvenience.
I'm going to reopen this issue just so I can use it to track the work for fixing the Dockerfile.
I tried to build a Docker image based on the latest code. I did the following:
But I got the following error:
The strange thing that I used the same steps to successfully build the image with an earlier version of Liftbridge.
Also, what is the benefit of having go.mod and go.sum files in the project when the Dockerfile does not seem to use the new module feature of golang?
EDIT:
Upon go getting Liftbridge
I am prompted with the following warnings/errors: