From 71aa4c919889157cac30c2c912d937c81d0b91ef Mon Sep 17 00:00:00 2001 From: Alexandr Kolesov Date: Tue, 11 Jan 2022 17:02:15 +0300 Subject: [PATCH] Optimize docker file --- docker/Dockerfile | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/docker/Dockerfile b/docker/Dockerfile index 9dab47ae3..682caa16e 100644 --- a/docker/Dockerfile +++ b/docker/Dockerfile @@ -51,23 +51,22 @@ RUN make proto-gen build FROM ubuntu:focal +RUN apt-get update \ + && export DEBIAN_FRONTEND=noninteractive \ + && apt-get -y install --no-install-recommends curl ca-certificates + # Node binary COPY --from=builder /app/build/cheqd-noded /bin # Runner script COPY docker/node-runner.sh /bin/node-runner +RUN chmod +x /bin/node-runner ARG CHEQD_HOME_DIR="/home/cheqd" ARG UID=1000 ARG GID=1000 RUN groupadd --system --gid $GID cheqd \ - && useradd --system --create-home --home-dir ${CHEQD_HOME_DIR} --shell /bin/bash --gid cheqd --uid $UID cheqd \ - && chmod +x /bin/node-runner \ - && mkdir -p ${CHEQD_HOME_DIR} \ - && chown -R cheqd ${CHEQD_HOME_DIR} \ - && apt-get update \ - && export DEBIAN_FRONTEND=noninteractive \ - && apt-get -y install --no-install-recommends curl ca-certificates + && useradd --system --create-home --home-dir ${CHEQD_HOME_DIR} --shell /bin/bash --gid cheqd --uid $UID cheqd WORKDIR ${CHEQD_HOME_DIR} USER cheqd