kinglion580 / syl_linux

Thinking on the challenge of Linux operation and maintenance
0 stars 0 forks source link

centos-desktop #5

Open kinglion580 opened 6 years ago

kinglion580 commented 6 years ago
FROM 10.161.129.46:5000/shiyanlou:centos7-desktop
MAINTAINER Aiden Luo <luojin@simplecloud.cn>

ENV DEBIAN_FRONTEND noninteractive

RUN \
rm -rf /tmp/.* ;\
rm -rf /tmp/* ;\

mkdir -p /etc/shiyanlou/sbin ;\
cp /var/local/* /etc/shiyanlou/sbin/ ;\
mv /etc/shiyanlou/sbin/init_docker.sh /etc/shiyanlou/sbin/init.sh ;\

# rm lock file when start up container
sed -i '2 arm -rf /tmp/.X*' /etc/shiyanlou/sbin/init.sh ;\
true

# install for chinese
RUN \
yum install -y kde-l10n-Chinese.noarch cjkuni-ukai-fonts ;\
true

COPY ./conf /etc/shiyanlou/conf
COPY ./script /etc/shiyanlou/sbin

RUN \
# move the config file
mv /etc/shiyanlou/conf/locale.conf /etc/locale.conf;\
true

ENV LC_ALL "zh_CN.UTF-8"

CMD ["/etc/shiyanlou/sbin/init.sh"]
kinglion580 commented 6 years ago
#!/bin/bash

# locale
export LANG="zh_CN.UTF-8"
export LANGUAGE="zh_CN:zh"
export LC_CTYPE="zh_CN.UTF-8"
export LC_NUMERIC="zh_CN.UTF-8"
export LC_TIME="zh_CN.UTF-8"
export LC_COLLATE="zh_CN.UTF-8"
export LC_MONETARY="zh_CN.UTF-8"
export LC_MESSAGES="zh_CN.UTF-8"
export LC_PAPER="zh_CN.UTF-8"
export LC_NAME="zh_CN.UTF-8"
export LC_ADDRESS="zh_CN.UTF-8"
export LC_TELEPHONE="zh_CN.UTF-8"
export LC_MEASUREMENT="zh_CN.UTF-8"
export LC_IDENTIFICATION="zh_CN.UTF-8"
export LC_ALL="zh_CN.UTF-8"

# start vnc
rm -rf /tmp/.X*
su - shiyanlou -c "vncserver :1"

# start ssh
/usr/sbin/sshd