xref: /DragonOS/tools/Dockerfile (revision 415e46ea470ba1dd33e4368c3684c700a75f3be8)
1FROM ubuntu:jammy
2
3# 设置环境变量
4ENV TZ=Asia/Shanghai
5RUN ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone
6
7# 设置工作目录
8WORKDIR /tmp
9
10# 将本地的脚本复制到工作目录
11COPY *.sh ./
12
13# 设置sudo免密码
14RUN apt update && \
15    apt install -y ca-certificates curl gnupg wget sudo apt-utils && \
16    bash bootstrap.sh --default && \
17    sudo cp /tmp/docker-entrypoint.sh /root/entrypoint.sh && \
18    sudo chmod a+rwx /root/entrypoint.sh && \
19    sudo apt autoremove -q -y && \
20    sudo apt clean -q -y && \
21    sudo rm -rf /tmp/*
22
23WORKDIR /root
24
25ENTRYPOINT [ "/root/entrypoint.sh" ]
26# 设置容器启动后执行的命令
27CMD ["/bin/bash"]
28