From b848c9bd9fe8de197e2110763e7c771e037ba946 Mon Sep 17 00:00:00 2001 From: Stanislav Bogatyrev Date: Fri, 2 Jul 2021 21:07:36 +0300 Subject: [PATCH] [#662] Add All-In-One NeoFS Docker image We need All-In-One Docker image to simplify NeoFS deployment in development and testing environments. Signed-off-by: Stanislav Bogatyrev --- Dockerfile.aio | 24 ++++++++++++++++++++++++ Makefile | 12 +++++++++++- 2 files changed, 35 insertions(+), 1 deletion(-) create mode 100644 Dockerfile.aio diff --git a/Dockerfile.aio b/Dockerfile.aio new file mode 100644 index 00000000..8bca1a81 --- /dev/null +++ b/Dockerfile.aio @@ -0,0 +1,24 @@ + +ARG HUB_IMAGE=nspccdev/neofs +ARG HUB_TAG=latest + +FROM ${HUB_IMAGE}-cli:${HUB_TAG} as neofs-cli +FROM ${HUB_IMAGE}-ir:${HUB_TAG} as neofs-ir +FROM ${HUB_IMAGE}-storage:${HUB_TAG} as neofs-storage + +# Executable image +FROM alpine AS neofs-aio +RUN apk add --no-cache \ + bash \ + ca-certificates \ + jq \ + expect \ + iputils + +WORKDIR / + +COPY --from=neofs-cli /bin/neofs-cli /bin/neofs-cli +COPY --from=neofs-ir /bin/neofs-ir /bin/neofs-ir +COPY --from=neofs-storage /bin/neofs-node /bin/neofs-node + +CMD ["neofs-cli"] diff --git a/Makefile b/Makefile index 39c39f55..63045173 100644 --- a/Makefile +++ b/Makefile @@ -62,7 +62,17 @@ protoc: done rm -rf vendor -# Build NeoFS Storage Node docker image +# Build all-in-one NeoFS docker image +image-aio: images + @echo "⇒ Build NeoFS All-In-One Docker image " + @docker build \ + --build-arg HUB_IMAGE=$(HUB_IMAGE) \ + --build-arg HUB_TAG=$(HUB_TAG) \ + --rm \ + -f Dockerfile.aio \ + -t $(HUB_IMAGE)-aio:$(HUB_TAG) . + +# Build NeoFS component's docker image image-%: @echo "⇒ Build NeoFS $* docker image " @docker build \