dm/docker/base-dm/Dockerfile

29 lines
1019 B
Docker
Raw Normal View History

2024-07-02 13:00:00 +08:00
# base-dm
2024-06-20 14:55:36 +08:00
FROM base
2024-06-19 19:23:01 +08:00
# 添加用户
2024-06-20 14:55:36 +08:00
RUN useradd -m -s /bin/bash dmdba \
2024-07-02 13:00:00 +08:00
# 修改用户密码
&& echo "dmdba:123456" | chpasswd \
&& apt-get -y update \
&& apt-get install -y --no-install-recommends \
2024-07-04 18:27:13 +08:00
p7zip-full unzip wget sudo \
2024-07-02 13:00:00 +08:00
&& apt-get clean \
&& rm -rf /config/* /tmp/* /var/lib/apt/lists/* /var/tmp/*
2024-06-19 19:23:01 +08:00
WORKDIR /home/dmdba
2024-06-20 14:55:36 +08:00
2024-07-09 11:29:50 +08:00
# 下载安装包并解压 删除掉之后无用的软件包,节约空间
2024-07-02 13:00:00 +08:00
RUN wget https://download.dameng.com/eco/adapter/DM8/202405/dm8_20240408_x86_rh7_64_ent_8.1.3.140.zip --no-check-certificate \
&& unzip dm8_20240408_x86_rh7_64_ent_8.1.3.140.zip \
&& chown -R dmdba:dmdba /home/dmdba \
&& rm -f dm8_20240408_x86_rh7_64_ent_8.1.3.140.zip \
&& 7z x dm8_20240408_x86_rh7_64.iso \
&& rm -f dm8_20240408_x86_rh7_64.iso \
&& chmod +x DMInstall.bin \
2024-07-04 18:27:13 +08:00
&& apt-get remove -y p7zip-full unzip wget \
&& usermod -aG sudo dmdba
2024-07-02 13:00:00 +08:00
USER dmdba
2024-07-09 11:29:50 +08:00
# 使用中文
ENV LANG=zh_CN.utf-8
2024-07-02 13:00:00 +08:00
CMD ["/bin/bash", "-e"]