Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/fyg369/lxc-docker
https://github.com/fyg369/lxc-docker
Last synced: about 2 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/fyg369/lxc-docker
- Owner: Fyg369
- Created: 2023-11-24T08:37:20.000Z (about 1 year ago)
- Default Branch: main
- Last Pushed: 2024-03-29T06:22:10.000Z (9 months ago)
- Last Synced: 2024-03-29T07:28:43.584Z (9 months ago)
- Language: Shell
- Size: 29.3 KB
- Stars: 0
- Watchers: 1
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# 安卓lxc-docker内核修改
# 开启配置
./LXC-DOCKER-OPEN-CONFIG.sh -w
# 关闭:ANDROID_PARANOID_NETWORK
#..CONFIG_ANDROID_PARANOID_NETWORK is not set
# 打补丁1(有则打无则过)
xt_qtagui.patch# 打补丁2(找准cgroup.c文件和函数位置打)
cgroup.patch## 一、安装Termux
首先,你需要下载并安装 [Termux](https://github.com/termux/termux-app/releases)。
然后,打开 `Termux`,执行以下命令:
```bash
apt update
apt upgrade
```## 二、安装必要的依赖
在Termux中执行以下命令:
```bash
pkg install root-repo
pkg install tsu docker
```## 三、启动 `Docker`
### 1. 挂载 `cgroup`
```bash
sudo mount -t tmpfs -o uid=0,gid=0,mode=0755 cgroup /sys/fs/cgroup
```### 2. 启动 `Docker` 守护进程,并让它在后台运行
下面的运行策略二选一即可。如果你不清楚其中的具体区别,请选择第一种:
```bash
sudo dockerd --iptables=false &>/dev/null &
# or
sudo ip route add default via 192.168.1.1 dev wlan0
sudo ip rule add from all lookup main pref 30000
sudo dockerd &>/dev/null &
```### 3. 测试 `Docker` 是否工作
```bash
sudo docker run hello-world
```看到 `hello world from docker` 字样即表示 `Docker` 正常工作
## 常见问题
### 1. 容器内无网络
```bash
echo "nameserver 8.8.8.8" > /etc/resolv.conf
groupadd -g 3003 aid_inet && usermod -G nogroup -g aid_inet _apt
```## Reference
- [wu17481748/lxc-docker](https://github.com/wu17481748/lxc-docker)
- [Flyme66/LXC-DOCKER-KernelSU_Action](https://github.com/Flyme66/LXC-DOCKER-KernelSU_Action)
- [DogDayAndroid/Android-Builder](https://github.com/DogDayAndroid/Android-Builder)
- [tomxi1997/lxc-docker-support-for-android](https://github.com/tomxi1997/lxc-docker-support-for-android)
- [Biohazardousrom/Kali-defconfig-checker](https://github.com/Biohazardousrom/Kali-defconfig-checker)
- [手机运行Docker: 从修改内核到刷入原生Linux](https://yzddmr6.com/posts/android-run-docker/)