From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on gnuweeb.org X-Spam-Level: X-Spam-Status: No, score=-1.2 required=5.0 tests=ALL_TRUSTED,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.6 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gnuweeb.org; s=default; t=1680076788; bh=91pSxBhT6YLOpZ1VVoedwzJWkkCxzW/4FuPPyFvw6fQ=; h=From:To:Cc:Subject:Date:In-Reply-To:References; b=VvgW0EkjzDagOaiCMXnSAmg/uNvUqcwjyD6Bx8XWSard+wYSK3LnP4O+cJ8BCquO/ nWQeFRza1cMv/VBAIjemZSoZZBWm5SWCEPHHhQ7vMEc84QcaJIkMiI+AtGiJoYzd/d gPUL4Dv2WgUa4hXuTt9FjPBglhvr4dtS352l360hg8A8cq/jP1T5fUckdY0wALIiCy xYJWVkjGWDXn9yXEoDybA/c2jeP5e5q5F9gBstUf8Yk5GVXqda4pvh3To5H3H1ihT3 ktrn7/K/6U9H0LNRx+T5bdOzgH4SB+7K3LWhIXmTcWNGTMRUqtHAXWlakg4YEZXLSM 1uISk9GTTQRtg== Received: from localhost.localdomain (unknown [182.253.88.211]) by gnuweeb.org (Postfix) with ESMTPSA id 64EF8242F26; Wed, 29 Mar 2023 07:59:45 +0000 (UTC) From: Ammar Faizi To: GNU/Weeb Mailing List Cc: Muhamad Hazmi Alfarizqi , Muhamad Hazmi Alfarizqi , Alviro Iskandar Setiawan , Arthur Lapz , Ammar Faizi Subject: [PATCH a001 v1 1/7] Use nginx from Ubuntu for simplicity Date: Wed, 29 Mar 2023 14:59:26 +0700 Message-Id: <20230329075932.492885-2-ammarfaizi2@gnuweeb.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20230329075932.492885-1-ammarfaizi2@gnuweeb.org> References: <20230329075932.492885-1-ammarfaizi2@gnuweeb.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit List-Id: Using custom nginx package has different directory structures. It confuses me when migrating the old data to this new docker container. Just use the nginx that Ubuntu provides. Signed-off-by: Ammar Faizi --- Dockerfile | 20 +++++++------------- apt-sources/nginx.list | 2 -- 2 files changed, 7 insertions(+), 15 deletions(-) delete mode 100644 apt-sources/nginx.list diff --git a/Dockerfile b/Dockerfile index 92d79f31f3f888e9..721ef4de494e186e 100644 --- a/Dockerfile +++ b/Dockerfile @@ -12,7 +12,10 @@ ARG DEBIAN_FRONTEND=noninteractive RUN yes | unminimize # Install base packages -RUN apt-get update && apt-get -y --no-install-recommends install ca-certificates gnupg htop ncurses-term vim software-properties-common sudo wget net-tools rsyslog +RUN apt-get update && apt-get -y --no-install-recommends install \ + ca-certificates gnupg htop ncurses-term vim \ + software-properties-common sudo wget net-tools rsyslog \ + openssh-server nginx mysql-server # Change root password, and create main user RUN echo "root:${rootPassword}" | chpasswd \ @@ -21,17 +24,6 @@ RUN echo "root:${rootPassword}" | chpasswd \ && usermod -aG sudo ${mainUser} \ && sed -i /etc/sudoers -re '/%sudo ALL=(ALL:ALL) ALL/s/^#//g' -# Copy additional apt sources -COPY apt-sources/* /etc/apt/sources.list.d - -# Install server components -RUN apt-key adv --fetch-keys https://nginx.org/keys/nginx_signing.key \ - && apt-get update \ - && apt-get -y --no-install-recommends install openssh-server nginx mysql-server - -# Mark port 48589/tcp is to be exposed -EXPOSE 48589/tcp 25/tcp 25/tcp 465/tcp 587/tcp 143/tcp 993/tcp - # Apply SSH config and add public keys COPY etc/ssh/sshd_config /etc/ssh/sshd_config RUN rm -rf /root/.ssh /home/${mainUser}/.ssh @@ -45,7 +37,9 @@ RUN chown -R root:root /root/.ssh \ # Mailserver RUN apt update \ - && apt -y --no-install-recommends install postfix postfix-mysql postfix-policyd-spf-python dovecot-core dovecot-imapd dovecot-lmtpd dovecot-mysql opendkim opendmarc + && apt -y --no-install-recommends install postfix postfix-mysql \ + postfix-policyd-spf-python dovecot-core dovecot-imapd \ + dovecot-lmtpd dovecot-mysql opendkim opendmarc COPY mailserver /root/mailserver RUN --mount=type=secret,required=true,id=config /root/mailserver/setup.sh diff --git a/apt-sources/nginx.list b/apt-sources/nginx.list deleted file mode 100644 index 4ae2224978c48157..0000000000000000 --- a/apt-sources/nginx.list +++ /dev/null @@ -1,2 +0,0 @@ -deb https://nginx.org/packages/ubuntu/ focal nginx -deb-src https://nginx.org/packages/ubuntu/ focal nginx \ No newline at end of file -- Ammar Faizi