From fb2c68386132facd9b08314e83c186f9ed24e6a2 Mon Sep 17 00:00:00 2001 From: David Binney Date: Thu, 20 Jun 2024 09:07:39 +0930 Subject: [PATCH] still wip --- Dockerfile | 34 +++++++++++----------------------- 1 file changed, 11 insertions(+), 23 deletions(-) diff --git a/Dockerfile b/Dockerfile index 3852fda..0f6a84f 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,4 +1,3 @@ -# Description: Dockerfile cluster utils service FROM debian:bookworm-slim # Metadata @@ -13,31 +12,20 @@ WORKDIR /app COPY ./*.sh /app/ -# Update and install basic tools -RUN apt-get update && apt-get install -y \ - dnsutils netcat-openbsd curl wget tar gnupg vim tmux zsh screenfetch && \ +# Update and install all required tools in one RUN command to minimize layers +RUN apt-get update && apt-get install -y --no-install-recommends \ + dnsutils netcat-openbsd curl wget tar gnupg vim tmux zsh \ + postgresql-client redis-tools git golang nodejs npm && \ apt-get clean && \ - rm -rf /var/lib/apt/lists/* + rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/* -# Install PostgreSQL client and Redis tools -RUN apt-get update && apt-get install -y \ - postgresql-client redis-tools && \ - apt-get clean && \ - rm -rf /var/lib/apt/lists/* - -# Install Git, Go, Node.js, and npm -RUN apt-get update && apt-get install -y \ - git golang nodejs npm && \ - apt-get clean && \ - rm -rf /var/lib/apt/lists/* - -# # Install MongoDB tools -# RUN curl -fsSL https://www.mongodb.org/static/pgp/server-7.0.asc | gpg -o /usr/share/keyrings/mongodb-server-7.0.gpg --dearmor && \ -# echo "deb [ signed-by=/usr/share/keyrings/mongodb-server-7.0.gpg ] http://repo.mongodb.org/apt/debian bookworm/mongodb-org/7.0 main" | tee /etc/apt/sources.list.d/mongodb-org-7.0.list && \ -# apt-get update && apt-get install -y mongodb-org-tools && \ +# Uncomment and modify the MongoDB tools installation if needed +# RUN curl -fsSL https://www.mongodb.org/static/pgp/server-7.0.asc | gpg --dearmor -o /usr/share/keyrings/mongodb-server-7.0.gpg && \ +# echo "deb [signed-by=/usr/share/keyrings/mongodb-server-7.0.gpg] http://repo.mongodb.org/apt/debian bookworm/mongodb-org/7.0 main" | tee /etc/apt/sources.list.d/mongodb-org-7.0.list && \ +# apt-get update && apt-get install -y --no-install-recommends mongodb-org-tools && \ # apt-get clean && \ -# rm -rf /var/lib/apt/lists/* +# rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/* RUN ./kickstart.sh -ENTRYPOINT ["zsh", "/app/sleeper.sh"] \ No newline at end of file +ENTRYPOINT ["zsh", "/app/sleeper.sh"]