maven
FROM --platform=amd64 maven:3-openjdk-18-slim RUN cd /etc/apt && > sources.list && cat > sources.list <<EOF deb https://mirrors.ustc.edu.cn/debian bullseye main contrib non-free deb-src https://mirrors.ustc.edu.cn/debian bullseye main contrib non-free deb https://mirrors.ustc.edu.cn/debian-security/ bullseye-security main deb-src https://mirrors.ustc.edu.cn/debian-security/ bullseye-security main deb https://mirrors.ustc.edu.cn/debian bullseye-updates main deb-src https://mirrors.ustc.edu.cn/debian bullseye-updates main EOF RUN apt update && apt-get install zip git -y
Python
FROM --platform=amd64 python:3.11.3-bullseye RUN cd /etc/apt && > sources.list && cat > sources.list <<EOF deb https://mirrors.ustc.edu.cn/debian bullseye main contrib non-free deb-src https://mirrors.ustc.edu.cn/debian bullseye main contrib non-free deb https://mirrors.ustc.edu.cn/debian-security/ bullseye-security main deb-src https://mirrors.ustc.edu.cn/debian-security/ bullseye-security main deb https://mirrors.ustc.edu.cn/debian bullseye-updates main deb-src https://mirrors.ustc.edu.cn/debian bullseye-updates main EOF RUN mkdir -pv /etc/xdg/pip && cd /etc/xdg/pip && cat > pip.conf <<EOF [global] index-url=http://mirrors.aliyun.com/pypi/simple extra-index-url=https://pypi.tuna.tsinghua.edu.cn/simple # proxy=http://user:password@proxy_name:port timeout=120 trusted-host=mirrors.aliyun.com quiet=0 verbose=2 [install] ignore-installed=true no-compile=false no-dependencies=false no-warn-script-location=false [freeze] timeout=10 EOF RUN apt update && apt-get install zip git jq -y && mkdir /root/ansible && pip install ansible WORKDIR /root
标签:container,list,apt,cd,sources,&&,Docker,Dockerfile From: https://www.cnblogs.com/dissipate/p/17319228.html