frostfs-rest-gw/Dockerfile
Denis Kirillov 61c51ce5a2 [#2] Update building
Signed-off-by: Denis Kirillov <d.kirillov@yadro.com>
2022-12-21 11:49:19 +03:00

27 lines
495 B
Docker

FROM golang:1.19 as basebuilder
RUN set -x \
&& apt-get update \
&& apt-get install -y make jq
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/frostfs-rest-gw /bin/frostfs-rest-gw
COPY --from=builder /src/static /static
ENTRYPOINT ["/bin/frostfs-rest-gw"]