无法在无根 docker 容器内运行 appimages
我已经在Ubuntu上安装了无根的Docker 20.04 [https://docs.docker.com/engine/security/security/rootless/] [1]
我有下载vscodium appimage,来自[https://github.com/vscodium/vscodium/vscodium/releleases/下载/1.66.0/vscodium-1.66.0-1648720116.glibc2.17-x86_64.appimage] [1]
我已经共享了带有无根docker容器的附属物的共享主机目录。但是它没有运行。当我手动安装(apt-get安装)在容器内部运行的容器内部任何GUI软件包(Ex。Firefox)。
命令的输出:docker-compose vscodium
创建VScodium ...完成
退出
附着于VSCODIUM
vscodium |代码:加载共享库时的错误:libnsss3.so:无法打开共享对象文件:没有此类文件或目录
vScodium用代码127- vScodium用代码127
文件docker-compose.yml
版本:“ 3”
服务:vscodium: 图片:Python:3.10.4-Bullseye 入口点:custom-docker-entrypoint.sh container_name:vscodium 环境: - display = $ {display} 卷: - /tmp/.x11-unix:/tmp/.x11-unix:ro - $ home/.xauthority:$ home/.xauthority:ro - ./custom-docker-entrypoint.sh:/usr/local/bin/custom-docker-entrypoint.sh - ./appimages/vscodium.appimage:/ide/vscodium.appimage Network_mode:主机
文件的内容custom-docker-entrypoint.sh
#!/bin/sh
chmod a+x/ide/vscodium.appimage
/ide/vscodium.Appimage -Appimage-tracktract-and-run
I have installed rootless docker on ubuntu 20.04 [https://docs.docker.com/engine/security/rootless/][1]
I have download vscodium appimage from [https://github.com/VSCodium/vscodium/releases/download/1.66.0/VSCodium-1.66.0-1648720116.glibc2.17-x86_64.AppImage][1]
i have shared host directory containing this Appimage with rootless docker container. But it doesn't run. When I manually install(apt-get install) any GUI package(ex. firefox) inside the container it runs successfully.
output of the command: docker-compose up vscodium
Creating vscodium ... done
Attaching to vscodium
vscodium | codium: error while loading shared libraries: libnss3.so: cannot open shared object file: No such file or directory
vscodium exited with code 127content of file docker-compose.yml
version: "3"
services:vscodium: image: python:3.10.4-bullseye entrypoint: custom-docker-entrypoint.sh container_name: vscodium environment: - DISPLAY=${DISPLAY} volumes: - /tmp/.X11-unix:/tmp/.X11-unix:ro - $HOME/.Xauthority:$HOME/.Xauthority:ro - ./custom-docker-entrypoint.sh:/usr/local/bin/custom-docker-entrypoint.sh - ./appImages/VSCodium.AppImage:/ide/VSCodium.AppImage network_mode: host
content of file custom-docker-entrypoint.sh
#!/bin/sh
chmod a+x /ide/VSCodium.AppImage
/ide/VSCodium.AppImage --appimage-extract-and-run
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
关于在 docker 中运行 AppImages 的一些注意事项:
libnss3.so
的 docker 上,您必须将其安装在主机系统上。如果它不起作用,您必须将其报告给 AppImage 作者,以便他们将其包含在捆绑包中。A few notes on running AppImages insude docker:
libnss3.so
, you will have to install this on the host system. If it doesn't work you will have to report it to the AppImage author to for them to include it in the bundle.