Docker images and scripts for setting up the server.
$ alias hostip="echo '<docker ip to host>'"
$ docker run --detach --restart always --name apt-repository-01 --publish 10101:80 anton-johansson/apt-repository
$ docker run --detach --restart always --name apt-repository-02 --publish 10102:80 anton-johansson/apt-repository
$ docker run --detach --restart always --name web-proxy --publish 80:80 --add-host=host:$(hostip) anton-johansson/web-proxy
$ docker build --tag anton-johansson/apt-repository apt-repository/
$ docker build --tag anton-johansson/web-proxy web-proxy/
# Exceptions to default policy:
iptables -A INPUT -p tcp --dport 22 -j ACCEPT
iptables -A INPUT -p tcp --dport 80 -j ACCEPT
# Set default policies:
iptables -P INPUT DROP
iptables -P FORWARD DROP
iptables -P OUTPUT ACCEPT
Apache License © Anton Johansson