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

-

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