26 lines
977 B
Docker
Executable File
26 lines
977 B
Docker
Executable File
FROM ubuntu
|
|
ENV DEBIAN_FRONTEND=noninteractive
|
|
ENV LANG=zh_CN.UTF-8
|
|
ENV LC_ALL=zh_CN.UTF-8
|
|
# 基础软件安装
|
|
RUN sed -i 's@//.*archive.ubuntu.com@//mirrors.ustc.edu.cn@g' /etc/apt/sources.list \
|
|
&& apt-get -y update && apt-get -y upgrade \
|
|
&& apt-get install -y sudo vim python3-pip ssh wget unzip p7zip* language-pack-zh-hans language-selector-common locales locales-all \
|
|
# 设置中文环境
|
|
&& apt install -y $(check-language-support) \
|
|
&& echo "zh_CN.UTF-8 UTF-8" >> /etc/locale.gen \
|
|
&& sudo /usr/sbin/update-locale LANG=zh_CN.UTF-8 LC_ALL=zh_CN.UTF-8 \
|
|
&& locale-gen \
|
|
# 添加用户
|
|
&& useradd -m -s /bin/bash dmdba \
|
|
# 修改用户密码
|
|
&& echo "dmdba:123456" | chpasswd
|
|
# 传入安装包并解压
|
|
COPY ./data/dm8.zip /home/dmdba
|
|
RUN cd /home/dmdba \
|
|
&& unzip dm8.zip \
|
|
&& chown -R dmdba:dmdba /home/dmdba \
|
|
&& rm -f dm8.zip \
|
|
&& 7z x dm8_20240408_x86_rh7_64.iso \
|
|
&& rm -f dm8_20240408_x86_rh7_64.iso \
|
|
&& chmod +x DMInstall.bin |