Skip to content
View in the app

A better way to browse. Learn more.

Unraid

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Docker Engine start after starting VM (PFSense)

Featured Replies

Hello,

I would like Docker Engine to start only after starting VM (PFSense). I downloaded Script from the Internet and I know when Pfsense is ready:

#!/bin/bash
printf "MT - %s" "czekam na uruchomienie pfSense ..."
while ! ping -c 1 -n -w 1 192.168.1.1 &> /dev/null
do
    printf "%c" "."
done
printf "\n%s\n"  "MT - pfSense jest już online"

How to start Docker Engine now, just like using the Settings -> Docker -> Enabled Docker = Yes

Pfsense assigns me an IP in my network in 192.168.1.0, and the first pool is reserved for Docker containers.

image.thumb.png.3eaf19fe50a2f823cd9b76d6d4e0f282.png

 

 

image.png.25548d48d935b8c1f46ce7920235ad92.png

 

 

Now, when Unraid restart, the docker containers do not start. The delay of running by 5 minutes of containers Docker does not help.

I used:
/etc/rc.d/rc.docker start
/etc/rc.d/rc.docker stop
but it's bad.

 

Edited by Marolo

One way would be to set all of the containers to NOT autostart and in your script add in the following to start up the containers:

docker start mosquitto
docker start syncthing
.
.
.

 

  • Author

Script:

#!/bin/bash
#/etc/rc.d/rc.docker stop
printf "MT - %s" "czekam na uruchomienie pfSense ..."
while ! ping -c 1 -n -w 1 192.168.1.1 &> /dev/null
do
    printf "%c" "."
done
printf "\n%s\n"  "MT - pfSense jest już online"
printf "\n%s\n"  "MT - Uruchamian Docker'a"
#/etc/rc.d/rc.docker start
docker start mosquitto
docker start syncthing
printf "\n%s\n"  "MT - Docker uruchomiony"

Log:

Script location: /tmp/user.scripts/tmpScripts/pfSense_Czy_Działa/script
Note that closing this window will abort the execution of this script
MT - czekam na uruchomienie pfSense ...
MT - pfSense jest już online

MT - Uruchamian Docker'a
Error response from daemon: network br0 not found
Error: failed to start containers: mosquitto
Error response from daemon: network br0 not found
Error: failed to start containers: syncthing

MT - Docker uruchomiony

 

image.png.f6d59508d30b25627ace93e050cdcb02.png

 

Manual start:

image.png.89679592e4b40f1bce854a2cbea3f1d5.png

 

 

To start the Docker containers:

 

Settings -> Docker -> Enabled Docker = No

Settings -> Docker -> Enabled Docker = Yes

 

 

 

Edited by Marolo

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.