Sign inSign up

ebenditt1/fog-server

By ebenditt1

•Updated over 5 years ago

fog-server for raspberry pi 3 on Debian Stretch latest

Image
0

10K+

ebenditt1/fog-server repository overview

⁠fog-server

fog-server Docker image for arm64

⁠In the file Dockerfile⁠:

FROM ebenditt1/fog-server:latest

RUN apt update && apt upgrade -y

EXPOSE 21 22 111 2049 8083 44383 69/udp

ENTRYPOINT ["/docker-entrypoint.sh"]

CMD /usr/sbin/apachectl -D FOREGROUND

⁠In the file docker-entrypoint.sh⁠:

#!/bin/sh

set -e

#sh -c '/bin/sed -i "s/^Listen 80.*/Listen 8083/g" /etc/apache2/ports.conf'
#sh -c '/bin/sed -i "s/Listen 443$/Listen 44383/g" /etc/apache2/ports.conf'
#sh -c '/bin/sed -i "1s/.*/<VirtualHost *>/g" /etc/apache2/sites-enabled/000-default.conf'
#sh -c '/bin/sed -i "1s/.*/<VirtualHost *>/g" /etc/apache2/sites-enabled/001-fog.conf'
#sh -c '/bin/sed -i "s/191.36.8.25/191.36.8.25:8083/g" /tftpboot/default.ipxe'

sh -c '/bin/sed -i "6s/.*/CN = 192.168.2.3/g" /opt/fog/snapins/ssl/req.cnf'
sh -c '/bin/sed -i "10s/.*/DNS.1 = 192.168.2.3/g" /opt/fog/snapins/ssl/req.cnf'
sh -c '/bin/sed -i "4s/.*/DNS.1 = 192.168.2.3/g" /opt/fog/snapins/ssl/ca.cnf'
sh -c "/bin/sed -i '/HOST/ s/\".*\"/\"192.168.2.3\"/g' /var/www/fog/lib/fog/config.class.php"
sh -c '/etc/init.d/start.services'

exec "$@"

If you want to change default port for the webserver:

Uncomment these lines

sh -c '/bin/sed -i "s/^Listen 80.*/Listen 8083/g" /etc/apache2/ports.conf'
sh -c '/bin/sed -i "s/Listen 443$/Listen 44383/g" /etc/apache2/ports.conf'
sh -c '/bin/sed -i "1s/.*/<VirtualHost *>/g" /etc/apache2/sites-enabled/000-default.conf'
sh -c '/bin/sed -i "1s/.*/<VirtualHost *>/g" /etc/apache2/sites-enabled/001-fog.conf'
sh -c '/bin/sed -i "s/192.168.2.3/192.168.2.3:8083/g" /tftpboot/default.ipxe'

else, leave these lines alone.

Change these lines with the approiate IP address:

sh -c '/bin/sed -i "6s/.*/CN = 192.168.2.3/g" /opt/fog/snapins/ssl/req.cnf'
sh -c '/bin/sed -i "10s/.*/DNS.1 = 192.168.2.3/g" /opt/fog/snapins/ssl/req.cnf'
sh -c '/bin/sed -i "4s/.*/DNS.1 = 192.168.2.3/g" /opt/fog/snapins/ssl/ca.cnf'
sh -c "/bin/sed -i '/HOST/ s/\".*\"/\"192.168.2.3\"/g' /var/www/fog/lib/fog/config.class.php"

else, leave these lines alone.

⁠network:

    sudo docker network create -d macvlan --subnet=192.168.2.0/24 --gateway=192.168.2.1 -o parent=eth0 mynet

** Replace the subnet and gateway with the appropriate network information

⁠create:

    sudo docker build --network mynet -t fog-server .

⁠run:

    sudo docker run -d --network mynet -P fog-server

Tag summary

Content type

Image

Digest

Size

384.5 MB

Last updated

over 5 years ago

docker pull ebenditt1/fog-server