Run the GUI application on Docker with Japanese input possible. Create based on the Docker image in the state where Japanese input is not possible. Create a container image by referring to Running GUI application on Docker container.
The following is not described.
--Introduce docker, docker-compose
Dockerfile
FROM sabocla6/ubuntu_ui
# ***********************************************
# install packages for xrdp, and do setting
# ***********************************************
RUN apt-get update && \
DEBIAN_FRONTEND=noninteractive apt-get install -y \
language-pack-ja-base language-pack-ja fonts-noto-cjk fcitx-mozc \
&& im-config -n fcitx
#Install GUI application for operation check
RUN apt-get update \
&& apt-get install -y gedit
ENV GTK_IM_MODULE=xim \
QT_IM_MODULE=fcitx \
XMODIFIERS=@im=fcitx \
DefalutIMModule=fcitx
RUN locale-gen ja_JP.UTF-8
ENV LANG=ja_JP.UTF-8 \
LC_ALL=ja_JP.UTF-8
Move to the directory where Dockerfile is stored and execute the following command.
Build Docker image
sudo docker build ./ -t sabocla6/ubuntu_ui_jp
Confirmation of starting the text editor
sudo docker run -v $HOME/.Xauthority:/root/.Xauthority -e DISPLAY=$DISPLAY -it --rm --network=host sabocla6/ubuntu_ui_jp gedit
If the text editor starts and you can input Japanese normally, you are done.
Run VS Code on Docker Run GUI application on Docker container (https://qiita.com/SabotageCLA6/items/6e6657284e1fba2d5c60)
How to input Japanese with the app in the Docker container
Recommended Posts