Open redguardtoo opened 4 years ago
分析发现问题可能是在连接docker运行命令的时候,docker不接受键盘输入。
可以考虑考虑提前配置并安装tzdata
,使用如下Dockerfile。
#This Dockerfile uses the ubuntu image
#Author: Rokas_Urbelis
#Email : Rokas.Yang@gmail.com
#Blog : https://blog.linux-code.com
FROM ubuntu:latest
MAINTAINER RokasUrbelis(Based on github deepin-wine-ubuntu project)
COPY install.sh deepin-wine-ubuntu/install.sh
ADD deepin-wine-ubuntu /root/deepin-wine-ubuntu
COPY link.sh /root/
COPY deb/ /root/deepin-wine-ubuntu/
#COPY sources.list /etc/apt/
RUN rm -rf /var/lib/apt/lists/*
RUN apt-get update
RUN ln -fs /usr/share/zoneinfo/Asia/Shanghai /etc/localtime
RUN apt-get install wget git locales ttf-wqy-zenhei sudo tzdata -y
RUN apt-get clean && apt-get autoclean
ENV LC_CTYPE=zh_CN.UTF-8 \
XMODIFIERS="@im=fcitx"
RUN \
locale-gen en_US.UTF-8 zh_CN.UTF-8 \
zh_CN.GBK && \
update-locale LANG=zh_CN.UTF-8
# Define default command.
RUN yes|bash /root/deepin-wine-ubuntu/install.sh
#RUN cd && ln -s /opt/deepin-wine-ubuntu/app/* .
RUN /bin/bash /root/link.sh && rm -f /root/link.sh
RUN rm -rf /root/deepin-wine-ubuntu
WORKDIR /root
CMD ["/bin/bash"]
可以在Dockerfile放好之后用git diff
查看我的更改.
能不能给run.sh加个语言的参数?
分析发现问题可能是在连接docker运行命令的时候,docker不接受键盘输入。 可以考虑考虑提前配置并安装
tzdata
,使用如下Dockerfile。#This Dockerfile uses the ubuntu image #Author: Rokas_Urbelis #Email : Rokas.Yang@gmail.com #Blog : https://blog.linux-code.com FROM ubuntu:latest MAINTAINER RokasUrbelis(Based on github deepin-wine-ubuntu project) COPY install.sh deepin-wine-ubuntu/install.sh ADD deepin-wine-ubuntu /root/deepin-wine-ubuntu COPY link.sh /root/ COPY deb/ /root/deepin-wine-ubuntu/ #COPY sources.list /etc/apt/ RUN rm -rf /var/lib/apt/lists/* RUN apt-get update RUN ln -fs /usr/share/zoneinfo/Asia/Shanghai /etc/localtime RUN apt-get install wget git locales ttf-wqy-zenhei sudo tzdata -y RUN apt-get clean && apt-get autoclean ENV LC_CTYPE=zh_CN.UTF-8 \ XMODIFIERS="@im=fcitx" RUN \ locale-gen en_US.UTF-8 zh_CN.UTF-8 \ zh_CN.GBK && \ update-locale LANG=zh_CN.UTF-8 # Define default command. RUN yes|bash /root/deepin-wine-ubuntu/install.sh #RUN cd && ln -s /opt/deepin-wine-ubuntu/app/* . RUN /bin/bash /root/link.sh && rm -f /root/link.sh RUN rm -rf /root/deepin-wine-ubuntu WORKDIR /root CMD ["/bin/bash"]
可以在Dockerfile放好之后用
git diff
查看我的更改.
你好,能大概说一下怎么用这个dockerfile吗 还是不会用
设一下环境变量 DEBIAN_FRONTEND=noninteractive
就可以了。
谷歌拼音输入法中文显示不了...
这个环境变量加哪里可以用
请问问题解决了吗?
分析发现问题可能是在连接docker运行命令的时候,docker不接受键盘输入。 可以考虑考虑提前配置并安装
tzdata
,使用如下Dockerfile。#This Dockerfile uses the ubuntu image #Author: Rokas_Urbelis #Email : Rokas.Yang@gmail.com #Blog : https://blog.linux-code.com FROM ubuntu:latest MAINTAINER RokasUrbelis(Based on github deepin-wine-ubuntu project) COPY install.sh deepin-wine-ubuntu/install.sh ADD deepin-wine-ubuntu /root/deepin-wine-ubuntu COPY link.sh /root/ COPY deb/ /root/deepin-wine-ubuntu/ #COPY sources.list /etc/apt/ RUN rm -rf /var/lib/apt/lists/* RUN apt-get update RUN ln -fs /usr/share/zoneinfo/Asia/Shanghai /etc/localtime RUN apt-get install wget git locales ttf-wqy-zenhei sudo tzdata -y RUN apt-get clean && apt-get autoclean ENV LC_CTYPE=zh_CN.UTF-8 \ XMODIFIERS="@im=fcitx" RUN \ locale-gen en_US.UTF-8 zh_CN.UTF-8 \ zh_CN.GBK && \ update-locale LANG=zh_CN.UTF-8 # Define default command. RUN yes|bash /root/deepin-wine-ubuntu/install.sh #RUN cd && ln -s /opt/deepin-wine-ubuntu/app/* . RUN /bin/bash /root/link.sh && rm -f /root/link.sh RUN rm -rf /root/deepin-wine-ubuntu WORKDIR /root CMD ["/bin/bash"]
可以在Dockerfile放好之后用
git diff
查看我的更改.
这个有用,我试了可以
apt-get install -y tzdata
很奇怪,最新版本中,tzdata还是会卡: 如提问者指出,在Dockerfile中加入这样一行:
ENV DEBIAN_FRONTEND=noninteractive
可以解决问题
由于默认的镜像源慢得让人怀疑人生,所以有必要更换成国内的镜像源。
在Dockerfile中添加
RUN sed -i s@/archive.ubuntu.com/@/mirrors.aliyun.com/@g /etc/apt/sources.list RUN apt-get clean
我用Debian