FROM golang:1.14-alpine as basebuilder
RUN apk add --update make bash

FROM basebuilder as builder
ARG BUILD=now
ARG VERSION=dev
ARG REPO=repository
WORKDIR /src
COPY . /src

RUN make bin/neofs-node

# Executable image
FROM alpine AS neofs-node
RUN apk add --no-cache bash

WORKDIR /

COPY --from=builder /src/bin/neofs-node /bin/neofs-node

CMD ["neofs-node"]