Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
itfl-service-public
normal-ubuntu-in-docker
Commits
cb4cfa8f
Commit
cb4cfa8f
authored
May 04, 2017
by
Your Name
Browse files
-
parent
13f22bc6
Changes
5
Hide whitespace changes
Inline
Side-by-side
README.md
View file @
cb4cfa8f
# monolithic simple normal Ubuntu-Server in Docker
nicht Best Practice (aber praktisch)
Docker installation .s
...
...
docker-compose.yml
View file @
cb4cfa8f
...
...
@@ -3,29 +3,33 @@ networks:
# for use with a reverse proxy
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/uniba.de/share:/root/uniba.de/share
-
./volumes/root/.bash_history:/root/.bash_history
-
./volumes/.git:/.git
docker/Dockerfile
View file @
cb4cfa8f
...
...
@@ -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
...
...
docker/setup.sh
View file @
cb4cfa8f
...
...
@@ -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
docker/start.sh
View file @
cb4cfa8f
#!/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
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment