2019独角兽企业重金招聘Python工程师标准>>>
sudo apt-get install ttf-wqy-microhei ttf-wqy-microhei ttf-wqy-zenhei kde-l10n-zhcn xfonts-wqy
ubuntu
yum install docker
Dockefile:
#!/bin/bash
FROM ubuntu
RUN apt-get update
RUN apt-get -y install firefox ttf-wqy-microhei ttf-wqy-zenhei xfonts-wqy
RUN apt-get -y install libcanberra-gtk3-module
# 用你自己的 uid /gid 替换下面的0
RUN export uid=0 gid=0
RUN mkdir -p /home/developer
RUN echo "developer:x:${uid}:${gid}:Developer,,,:/home/developer:/bin/bash" >> /etc/passwd
RUN echo "developer:x:${uid}:" >> /etc/group
RUN echo "developer ALL=(ALL) NOPASSWD: ALL" >> /etc/sudoers
RUN chmod 0440 /etc/sudoers
RUN chown ${uid}:${gid} -R /home/developer
USER developer
ENV HOME /home/developer
CMD /usr/bin/firefox
编译好docker
docker build --rm -t firefox .
启动firefox
docker run -ti --rm -e DISPLAY=$DISPLAY -v /tmp/.X11-unix:/tmp/.X11-unix firefox
转载于:https://my.oschina.net/9199771/blog/968299
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)