以ubuntu为例,首先,在主系统里运行
sudo apt-get install x11-xserver-utils
xhost +
这两句的作用是开放权限,允许所有用户,当然包括docker,访问X11 的显示接口
启动docker gui容器
docker run -d -v /etc/localtime:/etc/localtime:ro -v /tmp/.X11-unix:/tmp/.X11-unix -e DISPLAY=unix$DISPLAY -e GDK_SCALE -e GDK_DPI_SCALE -i -t --name s3t --net=host -e XMODIFIERS=@im=fcitx -e QT_IM_MODULE=fcitx -e GTK_IM_MODULE=fcitx successage/studio3t /usr/local/studio3t/Studio-3T
如果你的系统输入法是ibus,将上面的fcitx改成ibus才可以正常使用输入法
下次重新打开
docker restart s3t
如果试用过期,删除容器后重新运行
如果每次都重置数据运行
docker run -d -v /etc/localtime:/etc/localtime:ro -v /tmp/.X11-unix:/tmp/.X11-unix -e DISPLAY=unix$DISPLAY -e GDK_SCALE -e GDK_DPI_SCALE -i -t --rm --name s3t --net=host -e XMODIFIERS=@im=fcitx -e QT_IM_MODULE=fcitx -e GTK_IM_MODULE=fcitx successage/studio3t /usr/local/studio3t/Studio-3T
Dockerfile
FROM ubuntu:18.04
LABEL maintainer "Cherokee <[email protected]>"
COPY sources.list /etc/apt/sources.list
COPY studio-3t-linux-x64.tar.gz .
RUN dpkg --add-architecture i386
RUN apt-get update
RUN apt-get install -y openjdk-8-jdk
RUN apt-get install -y libswt-gtk-4-jni
RUN apt-get install -y libswt-gtk-4-java
RUN apt-get install -y locales
RUN apt-get install -y ttf-wqy-microhei
RUN apt-get install -y ttf-wqy-zenhei
RUN apt-get install -y xfonts-wqy
RUN locale-gen zh_CN
RUN locale-gen zh_CN.utf8
ENV LANG zh_CN.UTF-8
ENV LANGUAGE zh_CN.UTF-8
ENV LC_ALL zh_CN.UTF-8
RUN tar -xvzf studio-3t-linux-x64.tar.gz && yes "" | ./studio-3t-linux-x64.sh && rm studio-3t-linux-x64.*
CMD /usr/local/studio3t/Studio-3T
studio3t下载地址: https://download.studio3t.com/studio-3t/linux/2020.7.0/studio-3t-linux-x64.tar.gz
Content type
Image
Digest
Size
734.9 MB
Last updated
about 6 years ago
docker pull successage/studio3t