frostfs-http-gw/Dockerfile
Evgeniy Kulikov 01f13ef210
Prepare to release
- set output for flag set
- change env prefix for all environments
- migrate to CDN SDK release v0.1.0

Signed-off-by: Evgeniy Kulikov <kim@nspcc.ru>
2020-12-02 12:25:18 +03:00

33 lines
612 B
Docker

FROM golang:1 as builder
ENV GOGC off
ENV CGO_ENABLED 0
RUN set -x \
&& apt update \
&& apt install -y upx-ucl
WORKDIR /src
COPY . /src
ARG VERSION=dev
ENV LDFLAGS "-w -s -X main.Version=${VERSION}"
RUN set -x \
&& go build \
-v \
-mod=vendor \
-trimpath \
-ldflags "${LDFLAGS} -X main.Build=$(date -u +%s%N)" \
-o /go/bin/neofs-gw ./ \
&& upx -3 /go/bin/neofs-gw
# Executable image
FROM scratch
WORKDIR /
COPY --from=builder /go/bin/neofs-gw /bin/neofs-gw
COPY --from=builder /etc/ssl/certs/ca-certificates.crt /etc/ssl/certs/
ENTRYPOINT ["/bin/neofs-gw"]