Docker and nginx web server on router?


I have a gl.inet ax1700 flint with the latest firmware (newer openwrt). I currently have a local server with a an nginx docker app handling reverse proxies to various internal web apps so I can access them outside the network.

Now that I’ve updated the firmware on my router, I was thinking about moving my nginx server docker on app onto the router instead.

Curious if anyone has done this and how it’s working out for them. Is this workload easy on the router or is this a strain that would cause other things to not be stable in on the router?

Thanks in advance for your insights.

I suspect this is your answer for now:

root@GL-AXT1800:~# opkg install docker dockerd
Unknown package 'docker'.
Unknown package 'dockerd'.
Collected errors:
 * opkg_install_cmd: Cannot install package docker.
 * opkg_install_cmd: Cannot install package dockerd.

You might be able to do this if you compiled your own firmware, but I’m not sure how well that will work on an armv7 device (works fine on aarch64, but I’ve never tried on armv7). I suspect your biggest issue is going to be disk space, though you could get around that using a microSD card.

Hmm, I thought I saw a docker-ce package when I browsed through last night. Will check again.

I’m spinning a build right now on my Slate AX to see how/if it works.

Meh, for some reason it’s trying to build it as an armv5 image - and I’m not inclined to spend a whole lot more effort digging into it. Maybe if we had an aarch64 build…

Thanks @jdub. Hmm, I see docker compose an available package on the gl.inet plugins interface. I don’t see docker though. Can’t tell if docker is available or not…

1 Like

Yeah - docker-compose shows for me as well, but I don’t think that’s going to do much good without the underlying daemon :slight_smile:

I did notice that there is an lxc package in menuconfig, so that might be available.

Please check out MT2500 安装docker - MT2500,MV1000 - - Powered by Discuz!

Docker should be supported in 4.x firmware.


Thanks @alzhao .

Hi @jdub, are you planning to take a peek? Thanks.

Possibly. Most of my GL-iNet stuff is toy status on my home network - I primarily care about the travel side of things. But I’ll probably see if I can get docker up and running to play with. I have a Brume 2 arriving on Friday, I think, so that may be one of the first items of business.

Thanks so much. I only have the 1 router at home, and am afraid of testing (network going down).

Upgrading from 3.x to 4.x took the network down for an hour and things already got heated at home :wink:

That’s the truth!

I get the sense that there are a few people around here who like to tear down and completely rebuild their network every couple of months. No judgment! I was one of those people at one point. I moved over to a pfSense+WAP setup about 10 years ago for my main network and haven’t looked back. With both of us WFH with COVID I moved over to a high-availability (two router) setup with dual WAN failover. As long as we have power, we’ll have internet!

IMO a HA setup between two inexpensive routers (e.g. Brume 2’s) would be much more useful for most people than dual-WAN failovers. But I’m not the developer :slight_smile:

I’ll try to get docker running when it shows up. FYI, I noticed tonight that there is a squid package available, and you can certainly run nginx, as it is what Gl.iNet are running for their web interface. You’d have to alter the configs and possibly ports, but as a relatively lightweight proxy I would think the config should be doable. We run nginx in production in front of our webservers, but use haproxy to load balance. I’m not sure if that’s available, but it would be another possibility to segment things out from nginx.

Best of luck! Let me know what direction you’re leaning. I’ll try to get a slim Docker install when the Brume 2 comes in.

@alzhao sorry, I couldn’t follow the translation of the post referenced exactly. I see luci-app-dockerman as a package that could be installed. I don’t see dockerd. How does one go about installing that? Assuming a repository needs to be added, what is the URL?

Thank you.

Asking developers to add dockerd to the repo. Pls hold on.

Any updates @alzhao ? Thanks.

If you’re not docker insistent I did get LXC working on a Brume 2 today

@jdub I’ve never used LXC before. I’ve only gotten started with docker in the past 2 years, and finally got a handle on it via docker compose, and images provided by linuxserver. Hoping to just run nginx as a reverse proxy for my apps…

Gl-iNet’s web interface actually runs on nginx natively … you might be better off just modifying their config file to reverse proxy what you need to if that’s what you’re looking for. Though you’ll probably lose it on every firmware upgrade (use the more stock OpenWRT build!!! :slight_smile:)

My guess is that LXC would end up being too heavy on the flint/slate ax anyway. Docker may be, if it’s even possible.

1 Like

Dockerd is now available in the repo.

But AX1800 does not have enough storage to install at all.
You need to use external storage.

1 Like

@alzhao thank you, I see both docker and dockerd now.

I can plug in a USB drive, that’s not a problem. Do I have to specify any configuration for openwrt to know to install these packages on the USB drive? Any thoughts on performance / stability of running docker apps on Flint?

Thanks again.