✨ 添加多个开发环境的 Docker 配置,包括 Debian、Maven、LaTeX 和 Rust,移除旧的 Rust 配置
This commit is contained in:
34
general-devcontainer/Containerfile
Normal file
34
general-devcontainer/Containerfile
Normal file
@@ -0,0 +1,34 @@
|
||||
FROM docker.io/library/debian:12
|
||||
LABEL maintainer="clzhao98@outlook.com"
|
||||
RUN sed -i 's/deb.debian.org/mirrors.ustc.edu.cn/g' /etc/apt/sources.list.d/debian.sources
|
||||
RUN apt-get update && apt-get install -y \
|
||||
openssh-server build-essential cmake ninja-build\
|
||||
git vim-nox curl jq ripgrep bash-completion wget python3&& \
|
||||
apt-get clean &&\
|
||||
rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*
|
||||
|
||||
ENV http_proxy="socks5://10.177.21.228:10808"
|
||||
ENV https_proxy="socks5://10.177.21.228:10808"
|
||||
ENV no_proxy="localhost, 127.0.0.1, .example.com"
|
||||
|
||||
|
||||
LABEL description="Basic image for develop on debian12"
|
||||
LABEL version="1.0"
|
||||
EXPOSE 1922 80 9000
|
||||
|
||||
|
||||
## 配置 ssh 服务
|
||||
RUN mkdir /var/run/sshd
|
||||
RUN echo "Port 1922" >> /etc/ssh/sshd_config
|
||||
RUN echo "RSAAuthentication yes" >> /etc/ssh/sshd_config
|
||||
RUN echo "root:art@319" | chpasswd \
|
||||
&& sed -i 's/PermitRootLogin prohibit-password/PermitRootLogin yes/' /etc/ssh/sshd_config \
|
||||
&& sed -i 's/^#\(PermitRootLogin.*\)/\1/' /etc/ssh/sshd_config
|
||||
|
||||
|
||||
ADD start-ssh.sh /start-ssh.sh
|
||||
WORKDIR /workspace
|
||||
|
||||
CMD ["/start-ssh.sh"]
|
||||
#CMD ["service", "ssh", "start" ]
|
||||
#CMD ["/usr/sbin/sshd", "-D", "-p", "1922"]
|
Reference in New Issue
Block a user