docker icon indicating copy to clipboard operation
docker copied to clipboard

How to expose LuCI outside container

Open oxr463 opened this issue 4 years ago • 4 comments

I have a Dockerfile [1] that installs luci and luci-ssl, and a docker-compose.yml file [2], that exposes ports 80 and 443, but when I visit http://localhost or https://localhost in my browser, it isn't showing up. Also, I don't see any logs from uhttpd.

oxr463 avatar May 22 '21 00:05 oxr463

Hi ^^

have you found a solution to your problem ?

thanks

nononymousse avatar Mar 25 '22 11:03 nononymousse

No, I wasn't able to figure it out.

oxr463 avatar Mar 25 '22 16:03 oxr463

I'm able to access the interface just fine:

root@chef:~# curl https://localhost:4433 -k
<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
	<head>
		<meta http-equiv="Cache-Control" content="no-cache, no-store, must-revalidate" />
		<meta http-equiv="refresh" content="0; URL=cgi-bin/luci/" />
		<style type="text/css">
			body { background: white; font-family: arial, helvetica, sans-serif; }
			a { color: black; }

			@media (prefers-color-scheme: dark) {
				body { background: black; }
				a { color: white; }
			}
		</style>
	</head>
	<body>
		<a href="cgi-bin/luci/">LuCI - Lua Configuration Interface</a>
	</body>
</html>

The running container is based on your Dockerfile started via docker run --rm -it -p 8080:80 -p 4433:443 rootfs-test

aparcar avatar Mar 25 '22 22:03 aparcar

This is what I'm getting:

docker run --rm -it -p 8080:80 -p 4433:443 oxr463/luci-cli
Failed to resize receive buffer: Operation not permitted
/etc/preinit: line 5: can't create /sys/devices/system/cpu/microcode/reload: Read-only file system
ip: RTNETLINK answers: Operation not permitted
Press the [f] key and hit [enter] to enter failsafe mode
Press the [1], [2], [3] or [4] key and hit [enter] to select the debug level
ip: can't send flush request: Operation not permitted
ip: SIOCSIFFLAGS: Operation not permitted
Please press Enter to activate this console.

oxr463 avatar Apr 27 '22 00:04 oxr463