Commit 584480e2 authored by Your Name's avatar Your Name
Browse files

-

parents
version: '2'
networks:
# for use with a reverse proxy
backend:
driver: bridge
services:
ubuntu:
build:
context: ./docker/
dockerfile: Dockerfile
image: default-ubuntu-16-04:dirty
restart: always
hostname: kix-leer
expose:
- 22
- 80
- 443
ports:
# syntax to specify IP "141.13.240.24:80:80"
# map ssh port to 220 if already used
- "141.13.240.124:2214:22"
- "141.13.240.124:8014:80"
- "141.13.240.124:4414:443"
networks:
- backend
volumes:
# - ./volumes/var/www:/var/www
- ./volumes/var/lib/mysql:/var/lib/mysql
- ./volumes/opt:/opt
- ./volumes/root/uniba.de/share:/root/uniba.de/share
- ./volumes/.git:/.git
FROM ubuntu:16.04
RUN rm /etc/apt/sources.list
ADD sources.list /etc/apt/sources.list
RUN apt-get update
RUN apt-get upgrade -y
RUN DEBIAN_FRONTEND=noninteractive apt-get install -y \
ubuntu-server \
bash-completion \
vim \
git \
sudo \
rsync \
cron \
byobu \
openssh-server \
curl
RUN curl http://packages.kixdesk.com/repository/debian/PublicKey > kixkey
RUN cat kixkey | apt-key add -
RUN apt-get update
RUN locale-gen de_DE.utf8 && locale -a
RUN DEBIAN_FRONTEND=noninteractive apt-get install -y \
--allow-unauthenticated \
kix-mysql\
kix
RUN a2ensite default-ssl && a2enmod ssl
RUN make-ssl-cert generate-default-snakeoil --force-overwrite
# das brauchen wir später im normalen Dateisystem, wird aber beim moutnen von Volumes verdeckt
RUN mkdir -p /root/uniba.de/initial/var/lib/mysql/
RUN rsync -a /var/lib/mysql/ /root/uniba.de/initial/var/lib/mysql/
RUN mkdir -p /root/uniba.de/initial/opt/
RUN rsync -a /opt/ /root/uniba.de/initial/opt/
#
ADD start.sh /start
RUN chmod +x /start
#
RUN mkdir -p /root/uniba.de/initial/remove-after-run
ADD setup.sh /root/uniba.de/initial/remove-after-run/setup.sh
#
RUN mkdir -p /root/.ssh/
ADD authorized_keys2 /root/.ssh/authorized_keys2
CMD ["/start", "-D"]
ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDVhpkCOPHFkPL4+9KkMQ/ZvDZNjs4+ljGSGZdwqYwLD8zGzBBTqRbjtIw/1Vse50uLyCVNld5GdpLr22OCwQyozYxbmJ35D0241jQTJTM6xzWkLw0wEjhjiJyrLmllqeN/FieRvXzLXbbxW8lypYmAAR2JWfAuu11Bub7NuHExEv+KOKbZs8m0gy0Rh9+bDXUlo5MWAgrWk2UYTETuAoyjCbXpcl/1u/Vqj8gHl4VNRdXeyXzPoAvhv0jptoy7RlS3oQoniGDK2ho1WiLY7i4EmC2XJ29v3jGpeQrrcue+Cppx0K+dZVr6wdWJ5Yad03MXCfKBUrQn7/Zb6k4iY/S5 martin@martin
\ No newline at end of file
#!/bin/bash
rsync -a -v /root/uniba.de/share/overlay/ /
exit
#mit dem folgenden kann man die Volumes initialisieren,
# löscht aber alle Inhalte, deshab das exit oben
service mysql stop
service apache2 stop
rsync -a --delete /root/uniba.de/initial/var/lib/mysql/ /var/lib/mysql/
service mysql restart
rsync -a --delete /root/uniba.de/initial/opt/ /opt/
service apache2 restart
\ No newline at end of file
#
# deb cdrom:[Ubuntu-Server 14.04 LTS _Trusty Tahr_ - Release amd64 (20140416.2)]/ xenial main restricted
#deb cdrom:[Ubuntu-Server 14.04 LTS _Trusty Tahr_ - Release amd64 (20140416.2)]/ xenial main restricted
# See http://help.ubuntu.com/community/UpgradeNotes for how to upgrade to
# newer versions of the distribution.
deb http://ubuntu.mirror.lrz.de/ubuntu/ xenial main restricted
deb-src http://ubuntu.mirror.lrz.de/ubuntu/ xenial main restricted
## Major bug fix updates produced after the final release of the
## distribution.
deb http://ubuntu.mirror.lrz.de/ubuntu/ xenial-updates main restricted
deb-src http://ubuntu.mirror.lrz.de/ubuntu/ xenial-updates main restricted
## N.B. software from this repository is ENTIRELY UNSUPPORTED by the Ubuntu
## team. Also, please note that software in universe WILL NOT receive any
## review or updates from the Ubuntu security team.
deb http://ubuntu.mirror.lrz.de/ubuntu/ xenial universe
deb-src http://ubuntu.mirror.lrz.de/ubuntu/ xenial universe
deb http://ubuntu.mirror.lrz.de/ubuntu/ xenial-updates universe
deb-src http://ubuntu.mirror.lrz.de/ubuntu/ xenial-updates universe
## N.B. software from this repository is ENTIRELY UNSUPPORTED by the Ubuntu
## team, and may not be under a free licence. Please satisfy yourself as to
## your rights to use the software. Also, please note that software in
## multiverse WILL NOT receive any review or updates from the Ubuntu
## security team.
deb http://ubuntu.mirror.lrz.de/ubuntu/ xenial multiverse
deb-src http://ubuntu.mirror.lrz.de/ubuntu/ xenial multiverse
deb http://ubuntu.mirror.lrz.de/ubuntu/ xenial-updates multiverse
deb-src http://ubuntu.mirror.lrz.de/ubuntu/ xenial-updates multiverse
## N.B. software from this repository may not have been tested as
## extensively as that contained in the main release, although it includes
## newer versions of some applications which may provide useful features.
## Also, please note that software in backports WILL NOT receive any review
## or updates from the Ubuntu security team.
deb http://ubuntu.mirror.lrz.de/ubuntu/ xenial-backports main restricted universe multiverse
deb-src http://ubuntu.mirror.lrz.de/ubuntu/ xenial-backports main restricted universe multiverse
deb http://security.ubuntu.com/ubuntu xenial-security main restricted
deb-src http://security.ubuntu.com/ubuntu xenial-security main restricted
deb http://security.ubuntu.com/ubuntu xenial-security universe
deb-src http://security.ubuntu.com/ubuntu xenial-security universe
deb http://security.ubuntu.com/ubuntu xenial-security multiverse
deb-src http://security.ubuntu.com/ubuntu xenial-security multiverse
## Uncomment the following two lines to add software from Canonical's
## 'partner' repository.
## This software is not part of Ubuntu, but is offered by Canonical and the
## respective vendors as a service to Ubuntu users.
# deb http://archive.canonical.com/ubuntu xenial partner
# deb-src http://archive.canonical.com/ubuntu xenial partner
## Uncomment the following two lines to add software from Ubuntu's
## 'extras' repository.
## This software is not part of Ubuntu, but is offered by third-party
## developers who want to ship their latest software.
# deb http://extras.ubuntu.com/ubuntu xenial main
# deb-src http://extras.ubuntu.com/ubuntu xenial main
deb http://packages.kixdesk.com/repository/debian kix2016 stable
#!/bin/bash
sh /root/uniba.de/initial/remove-after-run/setup.sh
rm /root/uniba.de/initial/remove-after-run/setup.sh
mkdir /root/.ssh/
touch /root/.ssh/authorized_keys2
chmod 700 /root/.ssh/authorized_keys2
/sbin/init
service ssh restart
service rsyslog restart
service apache2 restart
service mysql restart
cron
tail -f /start
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment