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

chroot和docker配置失败 #89

Open
kero990 opened this issue Sep 23, 2023 · 3 comments
Open

chroot和docker配置失败 #89

kero990 opened this issue Sep 23, 2023 · 3 comments

Comments

@kero990
Copy link

kero990 commented Sep 23, 2023

shell文件不太熟悉,过程如下
直接在安装时自定义chroot路径,部署应该是成功的,但后续配置和进入全部失败,一闪而过的界面里似乎仍旧在调用/alpine
需要使用迁移,先直接回车迁移到/alpine下,再第二次使用迁移到自定义目录,这时可以成功

另一个问题是,即使chroot安装成功,docker也仍旧失败。反复提示docker还未安装。
手动在chroot下执行apk update,报错UNTRUSTED signature
我常年用debian,不熟悉alpine,不知道怎么改

 apk update
fetch http://mirrors.aliyun.com/alpine/latest-stable/main/x86_64/APKINDEX.tar.gz
ERROR: http://mirrors.aliyun.com/alpine/latest-stable/main/: UNTRUSTED signature
WARNING: Ignoring http://mirrors.aliyun.com/alpine/latest-stable/main/: No such file or directory
fetch http://mirrors.aliyun.com/alpine/latest-stable/community/x86_64/APKINDEX.tar.gz
ERROR: http://mirrors.aliyun.com/alpine/latest-stable/community/: UNTRUSTED signature
WARNING: Ignoring http://mirrors.aliyun.com/alpine/latest-stable/community/: No such file or directory
2 errors; 14 distinct packages available
[2]+  Done(127)                  nohup /usr/bin/dockerd 1>/dev/null 2>&1

希望好好捋一下shell运行逻辑和报错管理,获取到安装成功的提示或者执行docker命令成功在进入安装成功的流程,另外建议能看执行过程,这一闪而过的,考验截图速度呢。

@kero990
Copy link
Author

kero990 commented Sep 23, 2023

另外,在反复迁移后,还发现有时候迁移到/alpine下,但进入还调用自定义地址,比如/mnt/sda1/alpine
这时候进入迁移,地址还提示/alpine,然后在迁移到/mnt/sda1/alpine,调用地址甚至会变成/mnt/sda1/mnt/sda1/alpine

另外在chroot手动执行apk add docker时报错

pve:~# apk add docker --allow-untrusted
ERROR: FDB format error (line 114896)
ERROR: unable to select packages:
  runc (no such package):
    required by: containerd-1.7.2-r2[runc]
  tini-static (no such package):
    required by: docker-engine-23.0.6-r5[tini-static]

====================================
这个搞明白了,创建chroot时用的源是3.10的,但apk更新源引用的是latest的,导致版本对不上

@qiangwushuang
Copy link

另外,在反复迁移后,还发现有时候迁移到/alpine下,但进入还调用自定义地址,比如/mnt/sda1/alpine 这时候进入迁移,地址还提示/alpine,然后在迁移到/mnt/sda1/alpine,调用地址甚至会变成/mnt/sda1/mnt/sda1/alpine

另外在chroot手动执行apk add docker时报错

pve:~# apk add docker --allow-untrusted
ERROR: FDB format error (line 114896)
ERROR: unable to select packages:
  runc (no such package):
    required by: containerd-1.7.2-r2[runc]
  tini-static (no such package):
    required by: docker-engine-23.0.6-r5[tini-static]

==================================== 这个搞明白了,创建chroot时用的源是3.10的,但apk更新源引用的是latest的,导致版本对不上

请问是如何解决的?

@qiangwushuang
Copy link

apk add docker --allow-untrusted

已解决,首先进入chroot

  1. 查看chroot版本
cat /etc/alpine-release

我这里显示的是3.10.9
2. 手动切换alpine源的版本到3.10

vi /etc/apk/repositories

http://mirrors.aliyun.com/alpine/v3.10/main/
http://mirrors.aliyun.com/alpine/v3.10/community/

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

2 participants