add more debug information to build

This commit is contained in:
Evgeniy Kulikov 2020-02-25 18:39:35 +03:00
parent 4715468f3a
commit 51574e8274
No known key found for this signature in database
GPG key ID: BF6AEE0A2A699BF2

View file

@ -6,16 +6,17 @@ ARG REPO=github.com/nspcc-dev/neofs-gw
ENV GOGC off ENV GOGC off
ENV CGO_ENABLED 0 ENV CGO_ENABLED 0
ENV LDFLAGS "-w -s -X main.Version=${VERSION}" # add later -w -s
ENV LDFLAGS " -X main.Version=${VERSION} -compressdwarf=false"
WORKDIR /src WORKDIR /src
COPY . /src COPY . /src
RUN go build -v -mod=vendor -trimpath -ldflags "${LDFLAGS} -X main.Build=$(date -u +%s%N)" -o /go/bin/neofs-gw ./ RUN go build -v -mod=vendor -trimpath -gcflags=all="-N -l" -ldflags "${LDFLAGS} -X main.Build=$(date -u +%s%N)" -o /go/bin/neofs-gw ./
# Executable image # Executable image
FROM scratch FROM alpine
WORKDIR / WORKDIR /