forked from BlueSkyTools/BlueSkyConnect
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
54 lines (46 loc) · 1.36 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
FROM ubuntu:16.04
ENV IN_DOCKER=1 \
USE_HTTP=0 \
FAIL2BAN=1 \
SERVERFQDN=localhost \
MYSQLSERVER=db \
WEBADMINPASS=admin \
EMAILALERT=root@localhost \
LANG=C.UTF-8 \
LC_ALL=C.UTF-8 \
BLUESKY_VERSION=2.3.2
RUN apt-get update && \
apt-get install --no-install-recommends -y apache2 \
openssh-server \
openssl \
curl \
cron \
mysql-client \
php-mysql \
php \
libapache2-mod-php \
php-mysql \
inoticoming \
supervisor \
cpio \
netcat \
swaks \
rsyslog \
fail2ban \
iptables \
uuid-runtime \
libnet-ssleay-perl && \
apt-get clean && \
rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*
RUN mkdir /usr/local/bin/BlueSky /var/run/sshd /var/run/fail2ban
COPY . /usr/local/bin/BlueSky/
RUN mv /usr/local/bin/BlueSky/docker/supervisord.conf /etc/supervisor/conf.d/supervisord.conf && \
mv /usr/local/bin/BlueSky/docker/* /usr/local/bin/ && \
touch /var/log/auth.log /etc/default/locale && \
chown syslog:adm /var/log/auth.log && \
chmod 640 /var/log/auth.log && \
chmod +x /usr/local/bin/run /usr/local/bin/fail2ban-supervisor.sh /usr/local/bin/build_pkg.sh /usr/local/bin/build_admin_pkg.sh && \
echo "ServerName CHANGETHIS" >> /etc/apache2/apache2.conf
EXPOSE 22 80 443
VOLUME ["/certs", "/home/admin/.ssh", "/home/bluesky/.ssh", "/tmp/pkg"]
CMD ["/usr/local/bin/run"]