Commit 06fff508 authored by Marc Bärtschi's avatar Marc Bärtschi

fix Build

parent cb3f9f1b
FROM golang:1.12
ENV GO111MODULE on
ENV CGO_ENABLED 0
WORKDIR $GOPATH/src/git.dolansoft.org/marc/dns/backend
COPY backend/ .
RUN go get . && go install --ldflags="-w -s" .
WORKDIR /build
COPY go.mod go.sum ./
RUN go mod download
COPY . .
RUN cd backend && go build --ldflags="-w -s" -mod=readonly
FROM scratch
COPY --from=0 /go/bin/backend /backend
COPY --from=0 /build/backend/backend /backend
CMD ["/backend"]
FROM golang:1.12
ENV GO111MODULE on
ENV CGO_ENABLED 0
WORKDIR /build
COPY go.mod go.sum ./
RUN go mod download
COPY . .
RUN cd frontend && go build --ldflags="-w -s" -mod=readonly
FROM scratch
COPY --from=0 /build/frontend/frontend /frontend
CMD ["/frontend"]
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment