This commit is contained in:
root 2021-11-20 22:44:29 +01:00
commit 104c2933da
14 changed files with 2082 additions and 0 deletions

56
README Normal file
View File

@ -0,0 +1,56 @@
Border6 - Debian 6 (squeeze) / PHP 5.3 docker
==================================================================
/etc/default/grub
GRUB_CMDLINE_LINUX="net.ifnames=0 biosdevname=0 vsyscall=emulate"
apt-get install docker.io
Ha proxy kell:
cp -R docker.service.d /etc/systemd/system/
systemctl daemon-reload
systemctl restart docker
tar xzf border6.tar.gz
cd border6/border6
make Dockerfile
cd ..
docker build -t border6 border6
cp -i border6.logrotate /etc/logrotate.d/border6
cp -i border6.service /etc/systemd/system
cp -i border6.init /etc/init.d/border6
chmod 0755 /etc/init.d/border6
systemctl daemon-reload
systemctl enable border6
/etc/init.d/border6 start
Apache beállítás
================
a2enmod proxy proxy_http macro
systemctl restart apache2
---
<Macro Border6 $dir $mod>
<Location /$dir/mod/$mod>
ProxyPass http://localhost:86/$dir/mod/$mod
ProxyPassReverse http://localhost:86/$dir/mod/$mod
ProxyPreserveHost On
</Location>
</Macro>
<VirtualHost ...>
...
Use Border6 border mod1
Use Border6 border mod2
</VirtualHost>
UndefMacro Border6
---

18
border6.init Executable file
View File

@ -0,0 +1,18 @@
#!/bin/sh
### BEGIN INIT INFO
# Provides: border6
# Required-Start: $remote_fs $syslog docker
# Required-Stop: $remote_fs $syslog
# Default-Start: 2 3 4 5
# Default-Stop: 0 1 6
# Short-Description: BORDER Debian6 environment
# Description: BORDER Debian6 environment, built from Debian squeeze,
# contains apache2 + php 5.3
### END INIT INFO
# Author: ROTTLER Tamas <tom@bitfit.hu>
. /lib/lsb/init-functions
echo "Border6 service is systemd-only." >&2
exit 1

15
border6.logrotate Normal file
View File

@ -0,0 +1,15 @@
/var/log/border6/*.log {
daily
missingok
rotate 14
compress
notifempty
create 640 root adm
sharedscripts
postrotate
if systemctl status border6 >/dev/null; then \
docker exec border6.service apachectl graceful; \
fi;
endscript
}
# vim: set tabstop=4 shiftwidth=4 expandtab smarttab:

26
border6.service Normal file
View File

@ -0,0 +1,26 @@
[Unit]
Description=Border6 container
After=docker.service
Requires=docker.service
[Service]
TimeoutStartSec=0
Restart=always
ExecStart=-/usr/bin/docker run --name %n \
-v /var/www:/var/www \
-v /var/lib/php/sessions:/var/lib/php5 \
-v /var/run/mysqld:/var/run/mysqld \
-v /var/log/border6:/var/log/apache2 \
-v /var/spool/postfix/maildrop:/var/spool/postfix/maildrop \
-v /var/spool/postfix/public:/var/spool/postfix/public \
-v /opt/jdk1.8.0_202:/opt/jdk1.8.0_202 \
-v /opt/jdk8:/opt/jdk8 \
-p 127.0.0.1:86:86 \
border6 apachectl -D FOREGROUND
ExecStop=/usr/bin/docker stop %n
ExecStopPost=/usr/bin/docker rm %n
[Install]
WantedBy=multi-user.target
# vim: set tabstop=4 shiftwidth=4 expandtab smarttab:

29
border6/Dockerfile Normal file
View File

@ -0,0 +1,29 @@
FROM debian:squeeze
MAINTAINER Rottler Tamas <tom@bitfit.hu>
LABEL description="Border on Debian 6"
RUN echo Europe/Budapest > /etc/timezone && \
dpkg-reconfigure -f noninteractive tzdata
COPY sources.list apt.conf /etc/apt/
RUN apt-get update && apt-get install -y \
libapache2-mod-php5 php5-mysql php5-ldap
RUN apt-get purge -y php5-suhosin
RUN apt-get install -y vim
RUN groupadd -g 116 postfix && \
groupadd -g 117 postdrop && \
useradd -u 108 -g 116 postfix
RUN apt-get install -y --no-install-recommends postfix bsd-mailx
COPY charset /etc/apache2/conf.d/
COPY ports.conf /etc/apache2/
COPY default /etc/apache2/sites-available/
COPY php.ini /etc/php5/apache2/
RUN apt-get install -y bzip2 mysql-client
# docker build -t border6 border6
# vim: set tabstop=4 shiftwidth=4 expandtab smarttab:

29
border6/Dockerfile.tpl Normal file
View File

@ -0,0 +1,29 @@
FROM debian:squeeze
MAINTAINER Rottler Tamas <tom@bitfit.hu>
LABEL description="Border on Debian 6"
RUN echo Europe/Budapest > /etc/timezone && \
dpkg-reconfigure -f noninteractive tzdata
COPY sources.list apt.conf /etc/apt/
RUN apt-get update && apt-get install -y \
libapache2-mod-php5 php5-mysql php5-ldap
RUN apt-get purge -y php5-suhosin
RUN apt-get install -y vim
RUN groupadd -g {POSTFIX_GID} postfix && \
groupadd -g {POSTDROP_GID} postdrop && \
useradd -u {POSTFIX_UID} -g {POSTFIX_GID} postfix
RUN apt-get install -y --no-install-recommends postfix bsd-mailx
COPY charset /etc/apache2/conf.d/
COPY ports.conf /etc/apache2/
COPY default /etc/apache2/sites-available/
COPY php.ini /etc/php5/apache2/
RUN apt-get install -y bzip2 mysql-client
# docker build -t border6 border6
# vim: set tabstop=4 shiftwidth=4 expandtab smarttab:

6
border6/Makefile Normal file
View File

@ -0,0 +1,6 @@
postfix_uid = $(shell id -u postfix)
postfix_gid = $(shell getent group postfix | cut -d: -f3)
postdrop_gid = $(shell getent group postdrop | cut -d: -f3)
Dockerfile: Dockerfile.tpl
sed -n -e 's/{POSTFIX_UID}/$(postfix_uid)/;s/{POSTFIX_GID}/$(postfix_gid)/;s/{POSTDROP_GID}/$(postdrop_gid)/;w Dockerfile' Dockerfile.tpl

4
border6/apt.conf Normal file
View File

@ -0,0 +1,4 @@
#Acquire::http::Proxy "http://aptget:8972@10.93.171.66:8080/";
Acquire::Check-Valid-Until "0";
APT::Get::AllowUnauthenticated "true";

6
border6/charset Normal file
View File

@ -0,0 +1,6 @@
# Read the documentation before enabling AddDefaultCharset.
# In general, it is only a good idea if you know that all your files
# have this encoding. It will override any encoding given in the files
# in meta http-equiv or xml encoding tags.
AddDefaultCharset ISO-8859-2

24
border6/default Normal file
View File

@ -0,0 +1,24 @@
<VirtualHost *:86>
ServerAdmin webmaster@localhost
DocumentRoot /var/www/def/public
<Directory />
Options FollowSymLinks
AllowOverride None
</Directory>
<Directory /var/www/def/public>
Options -Indexes FollowSymLinks MultiViews
AllowOverride all
Order allow,deny
allow from all
</Directory>
ErrorLog ${APACHE_LOG_DIR}/error.log
# Possible values include: debug, info, notice, warn, error, crit,
# alert, emerg.
LogLevel warn
CustomLog ${APACHE_LOG_DIR}/access.log combined
</VirtualHost>

1855
border6/php.ini Normal file

File diff suppressed because it is too large Load Diff

3
border6/ports.conf Normal file
View File

@ -0,0 +1,3 @@
NameVirtualHost *:86
Listen 86

8
border6/sources.list Normal file
View File

@ -0,0 +1,8 @@
deb http://archive.debian.org/debian/ squeeze main non-free contrib
deb-src http://archive.debian.org/debian/ squeeze main non-free contrib
deb http://archive.debian.org/debian squeeze-lts main contrib non-free
deb-src http://archive.debian.org/debian squeeze-lts main contrib non-free
deb http://archive.debian.org/debian-backports squeeze-backports main

View File

@ -0,0 +1,3 @@
[Service]
Environment="HTTP_PROXY=http://aptget:8972@10.93.171.66:8080/"
Environment="HTTPS_PROXY=http://aptget:8972@10.93.171.66:8080/"