What you want is extroot, as you said you've tried.
It should absolutely mount the drive on boot... did you follow the process exactly? Did you see any error messages or other clues as to why it wasn't working for you?
What device are you using? I ask because you may not have enough RAM to actually run Docker (you can easily expand the flash storage space using a USB stick or other external media, but you will probably run out of RAM).
im using an AVM FRITZ!Box 4040 and it has like 250mb ram or something, so now I am actually not sure if I will be able to run docker but I still want more space for other packages either way
and for extroot, it is mounting the drive because I can access it with cd /mnt and see it when I go to 192.168.1.1/cgi-bin/luci/admin/system/mounts but it isnt letting me install anything there when I go to 192.168.1.1/cgi-bin/luci/admin/system/opkg pretty sure the command also doesnt let me
also I dont think there are any errors but also not really sure where to look and every command looked like it ran correctly
/dev/root on /rom type squashfs (ro,relatime)
proc on /proc type proc (rw,nosuid,nodev,noexec,noatime)
sysfs on /sys type sysfs (rw,nosuid,nodev,noexec,noatime)
cgroup2 on /sys/fs/cgroup type cgroup2 (rw,nosuid,nodev,noexec,relatime,nsdelegate)
tmpfs on /tmp type tmpfs (rw,nosuid,nodev,noatime)
/dev/mtdblock14 on /overlay type jffs2 (rw,noatime)
overlayfs:/overlay on / type overlay (rw,noatime,lowerdir=/,upperdir=/overlay/upper,workdir=/overlay/work)
tmpfs on /dev type tmpfs (rw,nosuid,noexec,noatime,size=512k,mode=755)
devpts on /dev/pts type devpts (rw,nosuid,noexec,noatime,mode=600,ptmxmode=000)
debugfs on /sys/kernel/debug type debugfs (rw,noatime)
none on /sys/fs/bpf type bpf (rw,nosuid,nodev,noexec,noatime,mode=700)
/dev/sda1 on /mnt type ext4 (rw,relatime)
This shows that sda1 has ~462MB of space (total), but it looks like the extroot didn't work to mount this as overlay.
I'd recommend resetting the router to defaults, then following the extroot process exactly -- post the entire ssh session and we'll see if there are any mistakes.
Well, it resets the router to the completely default state (including wifi disabled, default network configuration, no installed packages)... so... "break" depends on your perspective. This is usually the way to 'fix' things where there are unknown or old configs that might be wrong... fresh start and then rebuild.
Before you reset, you can make a backup of your current config (this doesn't include user-installed packages, but the config files for those packages would be included in the backup).
would I be able to do this but still have wifi to be able to access the router? also would this delete any file that I have made on the router and if it does how would I back those up?
also how much ram is required for docker?
You can backup whatever files you want by making sure it is included in the sysupgrade config file /etc/sysupgrade.conf
While there are ways to get wifi to be on by default, you'd have to create your own custom images. That's doable, but maybe more work than is warranted. Without that, you'd reset your router to defaults and you'd need to connect by ethernet to do the initial config (such as turning on Wifi). Then, from there you'd follow the extroot process and go from there.
also would it be possible to run a docker container in swap memory and if yes, how do I setup swap on openwrt
also so this sysupgrade.conf file will work?
## This file contains files and directories that should
## be preserved during an upgrade.
# /etc/example.conf
# /etc/openvpn/
/etc/init.d/startinfo.sh
/root/
Yes, but no.
I think it would function, yes. But the performance would be unacceptably slow. It would also wear out your external storage very rapidly.
If you really want to try it:
Don't forget -- if this is your main router and wifi AP, that would mean that everything gets slowed down. It simply isn't a good idea to try to run Docker on an embedded device like this that is also a key part of your network infrastructure.