From 1ad2fd2347942053a8e98f486957e3a31d8a6db5 Mon Sep 17 00:00:00 2001 From: Stefan Pejcic Date: Sat, 22 Feb 2025 09:23:36 +0100 Subject: [PATCH] Create Dockerfile --- docker/v1/Dockerfile | 53 ++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 53 insertions(+) create mode 100644 docker/v1/Dockerfile diff --git a/docker/v1/Dockerfile b/docker/v1/Dockerfile new file mode 100644 index 00000000..913497af --- /dev/null +++ b/docker/v1/Dockerfile @@ -0,0 +1,53 @@ +FROM ubuntu:latest + +LABEL maintainer="stefan@pejcic.rs" +LABEL author="Stefan Pejcic" +LABEL db="mysql" webserver="nginx" php="php8.2" +ENV TZ=UTC +ENV DEBIAN_FRONTEND=noninteractive + +RUN apt-get update && \ + apt-get install --no-install-recommends -y \ + ttyd \ + curl \ + cron \ + pwgen \ + zip \ + unzip \ + wget \ + nano \ + less \ + openssh-server && \ + postgresql-client && \ + mysql-client && \ + apt-get clean && \ + apt-get autoremove -y && \ + rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/* + + +########## EXPOSED PORTS ########## +EXPOSE 22 3306 7681 8080 + + +########## EMAIL ########## +COPY email/msmtprc /etc/msmtprc + + + +########## SSH ########## +ENV NOTVISIBLE "in users profile" +RUN echo "export VISIBLE=now" >> /etc/profile + + +########## SSL ############# +# openssl req -new -newkey rsa:4096 -days 365 -nodes -x509 -subj "/C=GB/ST=London/L=London/O=Global Security/OU=R&D Department/CN=openpanel.com" -keyout cert.key -out cert.crt +RUN mkdir -p /etc/nginx/ssl/ +COPY cert.key /etc/nginx/ssl/cert.key +COPY cert.crt /etc/nginx/ssl/cert.crt + +########## TERMINAL ############# +# fix for webterminal: bash: permission denied: /home/user/.bashrc +RUN chmod 755 /root + +########## cleanup ########## +RUN rm -rf /var/cache/apk/* /tmp/* /var/tmp/*