This repository was archived by the owner on Mar 18, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
58 lines (44 loc) · 2.21 KB
/
Dockerfile
File metadata and controls
58 lines (44 loc) · 2.21 KB
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
FROM debian:buster
MAINTAINER foxcris
#locale richtig setzen
RUN apt-get update && DEBIAN_FRONTEND=noninteractive apt-get install -y locales && apt-get clean
RUN sed -i -e 's/# en_US.UTF-8 UTF-8/en_US.UTF-8 UTF-8/' /etc/locale.gen && \
echo 'LANG="en_US.UTF-8"'>/etc/default/locale && \
dpkg-reconfigure --frontend=noninteractive locales && \
update-locale LANG=en_US.UTF-8
ENV LANG en_US.UTF8
#automatische aktualiserung installieren + basic tools
RUN apt-get update && apt-get -y upgrade && DEBIAN_FRONTEND=noninteractive apt-get install -y nano less wget gnupg anacron unattended-upgrades apt-transport-https crudini htop sudo&& apt-get clean
#repository fuer barman hinzufuegen
RUN wget --quiet -O - https://www.postgresql.org/media/keys/ACCC4CF8.asc | sudo apt-key add -
RUN echo 'deb http://apt.postgresql.org/pub/repos/apt/ buster-pgdg main' > /etc/apt/sources.list.d/pgdg.list
#install barman
RUN apt-get update && apt-get -y upgrade && DEBIAN_FRONTEND=noninteractive apt-get install -y barman && apt-get clean
#install additional packages for barman
RUN apt-get update && apt-get -y upgrade && DEBIAN_FRONTEND=noninteractive apt-get install -y openssh-client rsync postgresql-client && apt-get clean
#install openvpn
RUN apt-get update && apt-get -y upgrade && DEBIAN_FRONTEND=noninteractive apt-get install -y openvpn && apt-get clean
#configure openvpn
RUN sed -i 's/.*#AUTOSTART="all".*/AUTOSTART="all"/' /etc/default/openvpn
#install rsyslog
RUN apt-get update && apt-get -y upgrade && DEBIAN_FRONTEND=noninteractive apt-get install -y rsyslog && apt-get clean
#install openssh
RUN apt-get update && apt-get -y upgrade && DEBIAN_FRONTEND=noninteractive apt-get install -y openssh-server && apt-get clean
#backup default directories
RUN mv /etc/barman.conf /etc/barman.conf_default
RUN mv /etc/barman.d /etc/barman.d_default
RUN mkdir /etc/barman.d
RUN mv /etc/openvpn /etc/openvpn_default
RUN mkdir /etc/openvpn
RUN mv /etc/ssh /etc/ssh_default
RUN mkdir /etc/ssh
VOLUME /etc/barman.d
VOLUME /etc/openvpn
VOLUME /etc/ssh
VOLUME /var/log
VOLUME /var/lib/barman
VOLUME /var/spool/cron/crontabs
#EXPOSE 80 443 3000 5665 8000
COPY docker-entrypoint.sh /
RUN chmod 755 /docker-entrypoint.sh
ENTRYPOINT ["/docker-entrypoint.sh"]