我正在使用来自的 docker-compose 文件https://hub.docker.com/r/linuxserver/mysql-workbench。
version: "2.1"
services:
mysql-workbench:
image: lscr.io/linuxserver/mysql-workbench:latest
container_name: mysql-workbench
environment:
- PUID=1000
- PGID=1000
- TZ=Etc/UTC
volumes:
- /path/to/config:/config
ports:
- 3000:3000
- 3001:3001
cap_add:
- IPC_LOCK
restart: unless-stopped
当我发出时docker-compose up -d
我收到一个错误
mysql-workbench | [custom-init] No custom files found, skipping...
mysql-workbench | _XSERVTransmkdir: ERROR: euid != 0,directory /tmp/.X11-unix will not be created.
mysql-workbench |
mysql-workbench | Xvnc KasmVNC 1.2.0 - built Oct 26 2023 21:53:23
mysql-workbench | Copyright (C) 1999-2018 KasmVNC Team and many others (see README.me)
mysql-workbench | See http://kasmweb.com for information on KasmVNC.
mysql-workbench | Underlying X server release 12014000, The X.Org Foundation
mysql-workbench |
mysql-workbench | [ls.io-init] done.
mysql-workbench | Obt-Message: Xinerama extension is not present on the server
我究竟做错了什么?
答案1
我解决了它转到 mysql-workbench bash => sudo docker exec -it <container_id> bash 然后运行这些命令
- sudo apt-get 安装 xorg
- sudo apt-get 安装 xserver-xorg
- sudo apt-get 安装 libxinerama1
- 导出显示=:0.0
- sudo apt-get update 然后它就会起作用
或者将此图像用于 mysql-workbench
- 图片:lscr.io/linuxserver/mysql-workbench:8.0.29