🌴 Sync 2026-03-05 23:51:42

This commit is contained in:
github-actions[bot] committed 2026-03-05 23:51:42 +08:00
1 parent 97c049ed0a
commit 0acff03804
14253 files changed
+3893239

No files matched your search

+17
View File
@@ -0,0 +1,17 @@
#
# Copyright (C) 2008-2014 The LuCI Team <luci@lists.subsignal.org>
#
# This is free software, licensed under the Apache License, Version 2.0 .
#
include $(TOPDIR)/rules.mk
LUCI_TITLE:=Luci for Docker-CE
LUCI_DEPENDS:=+luci-compat +docker +dockerd +dockerd +e2fsprogs +fdisk
LUCI_PKGARCH:=all
PKG_VERSION:=1
PKG_RELEASE:=1
include $(TOPDIR)/feeds/luci/luci.mk
# call BuildPackage - OpenWrt buildroot signature
@@ -0,0 +1,20 @@
module("luci.controller.docker", package.seeall)
function index()
if not nixio.fs.access("/etc/config/docker") then
return
end
local page = entry({"admin", "services", "docker"}, cbi("docker"), _("Docker CE Container"), 199)
page.dependent = true
page.acl_depends = { "luci-app-docker" }
entry({"admin", "services", "docker", "status"}, call("act_status")).leaf = true
end
function act_status()
local e = {}
e.running = luci.sys.call("pgrep /usr/bin/dockerd >/dev/null") == 0
luci.http.prepare_content("application/json")
luci.http.write_json(e)
end
@@ -0,0 +1,23 @@
local running = (luci.sys.call("pidof portainer >/dev/null") == 0)
local button = ""
if running then
button = "&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<br /><br /><input type=\"button\" value=\" " .. translate("Open Portainer Docker Admin") .. " \" onclick=\"window.open('http://'+window.location.hostname+':" .. 9999 .. "')\"/><br />"
end
m = Map("docker", "Docker CE", translate("Docker is a set of platform-as-a-service (PaaS) products that use OS-level virtualization to deliver software in packages called containers.") .. button)
m:section(SimpleSection).template = "docker/docker_status"
s = m:section(TypedSection, "docker")
s.anonymous = true
wan_mode = s:option(Flag, "wan_mode", translate("Enable WAN access Dokcer"))
wan_mode.description = translate("Enable WAN access docker mapped ports")
wan_mode.default = 0
wan_mode.rmempty = false
o = s:option(DummyValue, "readme", translate(" "))
o.description = translate("<a href=\"../../../../DockerReadme.pdf\" target=\"_blank\" />"..translate("Download DockerReadme.pdf").."</a>")
return m
@@ -0,0 +1,22 @@
<script type="text/javascript">//<![CDATA[
XHR.poll(3, '<%=url([[admin]], [[services]], [[docker]], [[status]])%>', null,
function(x, data) {
var tb = document.getElementById('docker_status');
if (data && tb) {
if (data.running) {
var links = '<em><b><font color=green>Docker CE <%:RUNNING%></font></b></em>';
tb.innerHTML = links;
} else {
tb.innerHTML = '<em><b><font color=red>Docker CE <%:NOT RUNNING%></font></b></em>';
}
}
}
);
//]]>
</script>
<style>.mar-10 {margin-left: 50px; margin-right: 10px;}</style>
<fieldset class="cbi-section">
<p id="docker_status">
<em><%:Collecting data...%></em>
</p>
</fieldset>
+1
View File
@@ -0,0 +1 @@
zh_Hans
+39
View File
@@ -0,0 +1,39 @@
msgid ""
msgstr ""
"Project-Id-Version: Luci ARP Bind\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2015-06-23 20:16+0800\n"
"PO-Revision-Date: 2015-06-23 20:17+0800\n"
"Last-Translator: coolsnowwolf <coolsnowwolf@gmail.com>\n"
"Language-Team: PandoraBox Team\n"
"Language: zh_CN\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=1; plural=0;\n"
"X-Generator: Poedit 1.8.1\n"
"X-Poedit-SourceCharset: UTF-8\n"
msgid "Docker CE Container"
msgstr "Docker CE 容器"
msgid "Open Portainer Docker Admin"
msgstr "打开 Portainer Docker 管理页面"
msgid "Docker is a set of platform-as-a-service (PaaS) products that use OS-level virtualization to deliver software in packages called containers."
msgstr "Docker是一组平台即服务(platform-as-a-service,PaaS)产品,它使用操作系统级容器虚拟化来交付软件包。"
msgid "Enable WAN access Dokcer"
msgstr "允许 WAN 访问 Dokcer"
msgid "Enable WAN access docker mapped ports"
msgstr "允许 WAN 访问 Dokcer 映射后的端口(易受攻击!)。<br /><br />推荐禁用该选项后,用系统防火墙选择性映射 172.17.0.X:XX 端口到 WAN"
msgid "Docker Readme First"
msgstr "Docker 初始化无脑配置教程"
msgid "Download DockerReadme.pdf"
msgstr "下载 Docker 初始化无脑配置教程"
msgid "Please download DockerReadme.pdf to read when first-running"
msgstr "初次在OpenWrt中运行Docker必读(只需执行一次流程)"
+4
View File
@@ -0,0 +1,4 @@
config docker
option wan_mode '0'
+19
View File
@@ -0,0 +1,19 @@
#!/bin/sh
dtype=`fdisk -l /dev/sda | grep 'Disklabel type' | awk '{print $3}'`
partid="0"
if [ "$dtype" = "gpt" ]
then
partid=`echo "n
w
" | fdisk /dev/sda | grep 'Created a new partition' | awk '{print $5}'`
elif [ "$dtype" = "dos" ]
then
partid=`echo "n
p
w
" | fdisk /dev/sda | grep 'Created a new partition' | awk '{print $5}'`
fi
echo "y" | mkfs.ext4 /dev/sda$partid
+3
View File
@@ -0,0 +1,3 @@
#!/bin/sh
docker run -d --restart=always --name="portainer" -p 9999:9000 -v /var/run/docker.sock:/var/run/docker.sock -v portainer_data:/data portainer/portainer
@@ -0,0 +1,4 @@
{
"data-root": "/opt/",
"log-level": "warn"
}
+21
View File
@@ -0,0 +1,21 @@
#!/bin/sh /etc/rc.common
USE_PROCD=1
START=25
start_service() {
local nofile=$(cat /proc/sys/fs/nr_open)
local wanmode=$(uci get docker.@docker[0].wan_mode)
if [ $wanmode = "1" ] ;then
dockerwan=" "
else
dockerwan="--iptables=false"
fi
procd_open_instance
procd_set_param stderr 1
procd_set_param command /usr/bin/dockerd $dockerwan
procd_set_param limits nofile="${nofile} ${nofile}"
procd_close_instance
}
@@ -0,0 +1,11 @@
{
"luci-app-docker": {
"description": "Grant UCI access for luci-app-docker",
"read": {
"uci": [ "dockerd" ]
},
"write": {
"uci": [ "dockerd" ]
}
}
}
@@ -0,0 +1,4 @@
{
"config": "docker",
"init": "docker"
}
Binary file not shown.