Commit cb4cfa8f authored by Your Name's avatar Your Name
Browse files

-

parent 13f22bc6
# monolithic simple normal Ubuntu-Server in Docker
nicht Best Practice (aber praktisch)
Docker installation .s
......
......@@ -4,28 +4,32 @@ networks:
backend:
driver: bridge
services:
ubuntu:
build:
context: ./docker/
dockerfile: Dockerfile
image: default-ubuntu-16-04:dirty
hostname: normal-ubuntu-in-docker-1--i-1
restart: always
expose:
- 22
- 80
- 443
ports:
# syntax to specify IP "141.13.240.24:80:80"
# map ssh port to 220 if already used
- "220:22"
- "80:80"
- "443:443"
# syntax to specify IP
# - "141.13.240.24:80:80"
networks:
- backend
volumes:
#adapt to your need or remove
- ./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/root/.bash_history:/root/.bash_history
- ./volumes/.git:/.git
......@@ -4,43 +4,68 @@ ADD sources.list /etc/apt/sources.list
RUN apt-get update
RUN apt-get upgrade -y
# RUN apt-get install -y \
# bash-completion \
# vim \
# git \
# sudo \
# rsync \
# cron \
# byobu
RUN apt-get install -y \
bash-completion \
vim \
git \
sudo \
rsync \
cron \
imagemagick \
byobu
#
# #DEBIAN_FRONTEND=noninteractive
# RUN DEBIAN_FRONTEND=noninteractive apt-get install -y \
# apache2 \
# openssh-server \
# rsync \
# mysql-server
#
#
# RUN locale-gen de_DE.utf8 && locale -a
#
# RUN a2ensite default-ssl && a2enmod ssl
# RUN make-ssl-cert generate-default-snakeoil --force-overwrite
RUN DEBIAN_FRONTEND=noninteractive apt-get install -y \
apache2 \
openssh-server \
rsync \
mysql-server
#typo3
RUN apt-get install -y \
libapache2-mod-php \
php-common \
php-curl \
php-gd \
php-ldap \
php-mbstring \
php-soap \
php-xml \
php-xmlrpc \
php-zip \
php-mysql \
graphicsmagick \
curl \
tree
# composer \
RUN git config --global user.email "rz@uni-bamberg.de"; \
git config --global user.name "Docker INTERN"; \
git config --global push.default simple
RUN locale-gen de_DE.utf8 && locale -a
RUN a2ensite default-ssl && a2enmod ssl rewrite
RUN make-ssl-cert generate-default-snakeoil --force-overwrite
#
# RUN a2dismod mpm_event && a2enmod mpm_prefork && a2enmod headers
RUN a2dismod mpm_event && a2enmod mpm_prefork && a2enmod headers
#
#
# RUN mkdir -p /root/uniba.de/initial
# 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
RUN mkdir -p /root/uniba.de/initial/var/lib/mysql/
RUN rsync -a /var/lib/mysql/ /root/uniba.de/initial/var/lib/mysql/
#
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/uniba.de/initial/remove-after-run
ADD setup.sh /root/uniba.de/initial/remove-after-run/setup.sh
ADD init.sql /root/uniba.de/initial/remove-after-run/init.sql
#
# RUN mkdir -p /root/.ssh/
# ADD authorized_keys2 /root/.ssh/authorized_keys2
RUN mkdir -p /root/.ssh/
ADD authorized_keys2 /root/.ssh/authorized_keys2
......
......@@ -2,8 +2,7 @@
rsync -a -v /root/uniba.de/share/overlay/ /
#z.B.
#chown -R www-data /opt/otrs/
#a2ensite otrs
#service apache2 restart
\ No newline at end of file
#rsync -a --delete /root/uniba.de/initial/var/lib/mysql/ /var/lib/mysql/
#service mysql restart
\ No newline at end of file
#!/bin/bash
#run once at very first startup of the container
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
......
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