use vendor/, if found

This commit is contained in:
boyska 2018-09-30 13:15:30 +02:00
parent d7fcf9f249
commit 84be6af736

View file

@ -1,11 +1,11 @@
FROM golang:1.11-alpine as builder FROM golang:1.11-alpine as builder
RUN apk --no-cache add git gcc musl-dev RUN apk --no-cache add git gcc musl-dev
WORKDIR /panel/ WORKDIR /go/src/git.lattuga.net/boyska/feedpanel/
COPY ./ /panel/ COPY ./ /go/src/git.lattuga.net/boyska/feedpanel/
RUN rm -rf /panel/vendor/ && go get ./... && CGO_ENABLED=0 GOOS=linux go install -v ./... RUN go build -v ./cmd/...
FROM scratch FROM scratch
WORKDIR /usr/bin/ WORKDIR /usr/bin/
COPY --from=builder /go/bin/panelcli /usr/bin/ COPY --from=builder /go/bin/panelcli /usr/bin/
COPY --from=builder /go/bin/userpanel /usr/bin/ COPY --from=builder /go/bin/userpanel /usr/bin/
ENTRYPOINT ["./userpanel"] ENTRYPOINT ["./userpanel"]