This repository has been archived by the owner on Feb 3, 2024. It is now read-only.
-
-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathDockerfile
92 lines (71 loc) · 2.26 KB
/
Dockerfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
FROM debian:stable-slim
# ===================================================
# Configuration
# ===================================================
# Froxlor
ENV FRX_WEB_DIR="/var/customers/webs"
ENV FRX_DB_HOST="localhost"
ENV FRX_DB_NAME="froxlor"
ENV FRX_DB_USER="froxlor"
ENV FRX_DB_PASSWORD=""
# ProFTPd
ENV SERVER_NAME="Froxlor FTP"
# Time
ENV TZ="Europe/Berlin"
# SFTP
ENV SFTP_PORT=21
ENV SFTP_ENGINE="on"
# TLS
ENV TLS_CERT_BITS=2048
ENV TLS_CERT_COMMON_NAME="localhost"
ENV TLS_CERT_COUNTRY=""
ENV TLS_CERT_DAYS=3652
ENV TLS_CERT_ORGANIZATION=""
ENV TLS_CERT_STATE=""
ENV TLS_ENGINE="off"
ENV TLS_PROTOCOLS="TLSv1.2 TLSv1.3"
# ===================================================
# Ports
# ===================================================
EXPOSE 21
# ===================================================
# Base packages
# ===================================================
RUN apt-get update && \
apt-get upgrade -y --no-install-recommends
RUN apt-get install -y --no-install-recommends \
apt-transport-https \
ca-certificates \
gettext-base \
syslog-ng \
unattended-upgrades
# ===================================================
# OpenSSH
# ===================================================
RUN apt-get install -y --no-install-recommends \
openssh-server
# ===================================================
# ProFTPD
# ===================================================
RUN apt-get install -y --no-install-recommends \
proftpd-basic \
proftpd-mod-mysql
RUN mkdir -p ${FRX_WEB_DIR}
# ===================================================
# Filesystem
# ===================================================
COPY ./src/ /
RUN chmod 0700 "/etc/proftpd/create-cert.sh" && \
chown root:0 "/etc/proftpd/create-cert.sh" && \
chmod 0600 "/etc/proftpd/proftpd.conf" && \
chown root:0 "/etc/proftpd/proftpd.conf" && \
chmod 0644 "/etc/proftpd/modules.conf" && \
chown root:0 "/etc/proftpd/modules.conf" && \
chmod 0600 "/etc/proftpd/sql.conf" && \
chown root:0 "/etc/proftpd/sql.conf" && \
chmod 0644 "/etc/proftpd/tls.conf" && \
chown root:root "/etc/proftpd/tls.conf"
# ===================================================
# Entrypoint
# ===================================================
ENTRYPOINT ["bash", "/start.sh"]