public inbox for [email protected]
 help / color / mirror / Atom feed
From: Ammar Faizi <[email protected]>
To: GNU/Weeb Mailing List <[email protected]>
Cc: Muhamad Hazmi Alfarizqi <[email protected]>,
	Muhamad Hazmi Alfarizqi <[email protected]>,
	Alviro Iskandar Setiawan <[email protected]>,
	Arthur Lapz <[email protected]>,
	Ammar Faizi <[email protected]>
Subject: [PATCH a001 v1 1/7] Use nginx from Ubuntu for simplicity
Date: Wed, 29 Mar 2023 14:59:26 +0700	[thread overview]
Message-ID: <[email protected]> (raw)
In-Reply-To: <[email protected]>

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 <[email protected]>
---
 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


  reply	other threads:[~2023-03-29  7:59 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-03-29  7:59 [PATCH a001 v1 0/7] server-a001 updates Ammar Faizi
2023-03-29  7:59 ` Ammar Faizi [this message]
2023-03-29  7:59 ` [PATCH a001 v1 2/7] start.sh: Add vmail storage directory Ammar Faizi
2023-03-29  7:59 ` [PATCH a001 v1 3/7] Dockerfile: Upgrade the Ubuntu version to 22.04 (jammy) Ammar Faizi
2023-03-29  7:59 ` [PATCH a001 v1 4/7] Dockerfile: Set the default main user to "ubuntu" Ammar Faizi
2023-03-29  7:59 ` [PATCH a001 v1 5/7] Add an installer script Ammar Faizi
2023-03-29  7:59 ` [PATCH a001 v1 6/7] Create a simple init program Ammar Faizi
2023-03-29  7:59 ` [PATCH a001 v1 7/7] docker-entrypoint: Properly set directory ownership and mode Ammar Faizi
2023-03-29 19:36 ` [PATCH a001 v1 0/7] server-a001 updates Alviro Iskandar Setiawan

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    [email protected] \
    [email protected] \
    [email protected] \
    [email protected] \
    [email protected] \
    [email protected] \
    [email protected] \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox