2022-04-11 09:35:06 +00:00
|
|
|
FROM golang:1.17 as basebuilder
|
|
|
|
|
|
|
|
RUN set -x \
|
|
|
|
&& apt-get update \
|
2022-06-09 09:59:02 +00:00
|
|
|
&& apt-get install -y make jq
|
2022-04-11 09:35:06 +00:00
|
|
|
|
|
|
|
FROM basebuilder as builder
|
|
|
|
ENV GOGC off
|
|
|
|
ENV CGO_ENABLED 0
|
|
|
|
ARG VERSION=dev
|
|
|
|
ARG REPO=repository
|
|
|
|
|
|
|
|
WORKDIR /src
|
|
|
|
COPY . /src
|
|
|
|
|
|
|
|
RUN make
|
|
|
|
|
|
|
|
# Executable image
|
|
|
|
FROM scratch
|
|
|
|
|
|
|
|
WORKDIR /
|
|
|
|
|
|
|
|
COPY --from=builder /etc/ssl/certs/ca-certificates.crt /etc/ssl/certs/
|
|
|
|
COPY --from=builder /src/bin/neofs-rest-gw /bin/neofs-rest-gw
|
|
|
|
|
|
|
|
ENTRYPOINT ["/bin/neofs-rest-gw"]
|