Changes
Page history
Updated Installing using Docker (recommended!) (markdown)
authored
Feb 13, 2021
by
Simon
Show whitespace changes
Inline
Side-by-side
Installing-using-Docker-(recommended!).md
View page @
ce775ffd
...
@@ -4,29 +4,20 @@
...
@@ -4,29 +4,20 @@
Firstly, you need a system running docker. For debian-based systems, this is simple:
Firstly, you need a system running docker. For debian-based systems, this is simple:
`
#
apt-get install docker.io`
`apt-get install docker.io`
A change needs to be made to the docker config for openbridge to work correctly:
A change needs to be made to the docker config for openbridge to work correctly:
`#echo "{
`echo "{ userland-proxy: false}" > /etc/daemon.json`
userland-proxy: false
}
" > /etc/daemon.json`
`#systemctl restart docker`
`systemctl restart docker`
`
## Pull the FreeDMR stable image (currently v1.1)
`
#docker pull hacknix/freedmr:v1.1-with-proxy
`
## Grab and edit the config file
## Grab and edit the config file
`
#mkdir /etc/freedmr
`
`mkdir /etc/freedmr`
`
#chmod 755 /etc/freedmr
`
`chmod 755 /etc/freedmr`
edit /etc/freedmr/freedmr.cfg with your favourite editor:
edit /etc/freedmr/freedmr.cfg with your favourite editor:
...
@@ -91,26 +82,25 @@ Remember to configure the database connection
...
@@ -91,26 +82,25 @@ Remember to configure the database connection
## Make empty rules file
## Make empty rules file
`
#echo BRIDGES = {
`echo "BRIDGES = {}" > /etc/freedmr/rules.py`
}
> /etc/freedmr/rules.py`
## Make sure docker image can access config and rules
## Make sure docker image can access config and rules
`
#
chown -R 54000 /etc/freedmr`
`chown -R 54000 /etc/freedmr`
## Make log directory
## Make log directory
`
#
mkdir -p /var/log/freedmr`
`mkdir -p /var/log/freedmr`
## Make sure docker image can access logfile
## Make sure docker image can access logfile
`
#
chown 54000 /var/log/freedmr'
`
chown 54000 /var/log/freedmr'
## Run docker instance and check it all starts up OK
## Run docker instance and check it all starts up OK
'docker run -v --read-only /etc/freedmr/freedmr.cfg:/opt/freedmr/freedmr.cfg -v /var/log/freedmr/freedmr.log:/opt/freedmr/freedmr.log -v /etc/freedmr/rules.py:/opt/freedmr/rules.py -p 54100-54150:54100-54150/udp -p 62031:62031/udp -p 62036-62046:62036-62046/udp -p 4321:4321/tcp hacknix/freedmr:v1.1-with-proxy`
docker run -v --read-only /etc/freedmr/freedmr.cfg:/opt/freedmr/freedmr.cfg -v /var/log/freedmr/freedmr.log:/opt/freedmr/freedmr.log \
-v /etc/freedmr/rules.py:/opt/freedmr/rules.py -p 54100-54150:54100-54150/udp -p 62031:62031/udp -p 62036-62046:62036-62046/udp \
-p 4321:4321/tcp hacknix/freedmr:v1.1-with-proxy`
Hopefully this will run fine. If you have made any mistakes you may have to stop, edit config and restart.
Hopefully this will run fine. If you have made any mistakes you may have to stop, edit config and restart.
...
@@ -118,13 +108,13 @@ Hopefully this will run fine. If you have made any mistakes you may have to stop
...
@@ -118,13 +108,13 @@ Hopefully this will run fine. If you have made any mistakes you may have to stop
In another terminal:
In another terminal:
`
#
docker container ls`
`docker container ls`
Take the name at the end of the line
Take the name at the end of the line
`
#
docker container stop <name>`
`docker container stop <name>`
`
#
docker container rm <name>`
`docker container rm <name>`
## In the first terminal
## In the first terminal
...
@@ -134,13 +124,12 @@ Start FreeDMR detached (no console)
...
@@ -134,13 +124,12 @@ Start FreeDMR detached (no console)
-v "/etc/freedmr/rules.py:/opt/freedmr/rules.py" -p 54100-54150:54100-54150/udp -p 62031:62031/udp -p 62036-62046:62036-62046/udp -p
\
-v "/etc/freedmr/rules.py:/opt/freedmr/rules.py" -p 54100-54150:54100-54150/udp -p 62031:62031/udp -p 62036-62046:62036-62046/udp -p
\
4321:4321/tcp "hacknix/freedmr:v1.1-with-proxy"
4321:4321/tcp "hacknix/freedmr:v1.1-with-proxy"
## Start on boot / restart on die
`docker container ls`
`docker container ls`
Grab the name
Grab the name
## Start on boot / restart on die
`docker update --restart unless-stopped <name>`
`docker update --restart unless-stopped <name>`