Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

群晖 nas && docker #63

Open
imfenghuang opened this issue Sep 18, 2024 · 0 comments
Open

群晖 nas && docker #63

imfenghuang opened this issue Sep 18, 2024 · 0 comments

Comments

@imfenghuang
Copy link
Owner

imfenghuang commented Sep 18, 2024

yacd 有 bug,导致无法使用代理,目前暂时这样解决,重新构建镜像

haishanh/yacd#814

git clone https://github.com/hinak0/yacd.git
cd yacd
docker build --no-cache \
    --build-arg TARGETPLATFORM=linux/amd64 \
    --build-arg BUILDPLATFORM=linux/amd64 \
    -t hinak0/yacd:master \
    -f Dockerfile .

由于一些原因,群晖上的 docker 无法直接下载镜像文件,故需要从本机复制镜像文件过去,操作如下

# local
docker save REPOSITORY:TAG -o /path/file.tar
cd  /path/
scp file.tar [email protected]:/path/to/dir

# ssh login nas
cd /path/to/dir
docker load < file.tar
# docker images

可能需要用到的 dreamacro/clash 等镜像都可以这么上传

上传完毕之后,在群晖的 docker 下安装刚手动上传的镜像即可,注意暴露出响应的端口,如 clash7890/7891/9090

注意开启允许 LAN 访问

群晖本身使用代理:控制面板 - 网络 - 常规 - 代理服务器 - 填写设置的IP端口 - 应用

docker 常用命令

docker build --pull=false -t name:tag -f /path/to/Dockerfile .
docker run -it -p local-port:container-port -v /path/local/xxx:/path/container/xxx image
docker rmi image -f
docker rm container -f [-l] [-v]

ssh

ssh -p port user@ip
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant