Upgrade Python to 3.12 via Miniconda3-py312_26.3.2-2
Switch from Miniconda3-py310_23.11.0-2 to Miniconda3-py312_26.3.2-2 (Python 3.10 -> 3.12) across both Dockerfile variants. Constraint: Tsinghua mirror URL updated in both files Confidence: high Scope-risk: narrow Tested: both images build and report Python 3.12.13
Showing
2 changed files
with
14 additions
and
10 deletions
| ... | @@ -14,7 +14,7 @@ RUN apt-get update && \ | ... | @@ -14,7 +14,7 @@ RUN apt-get update && \ |
| 14 | rm -rf /var/lib/apt/lists/* | 14 | rm -rf /var/lib/apt/lists/* |
| 15 | 15 | ||
| 16 | # Python (Miniconda) | 16 | # Python (Miniconda) |
| 17 | RUN curl -sSLk https://mirrors.tuna.tsinghua.edu.cn/anaconda/miniconda/Miniconda3-py310_23.11.0-2-Linux-x86_64.sh \ | 17 | RUN curl -sSLk https://mirrors.tuna.tsinghua.edu.cn/anaconda/miniconda/Miniconda3-py312_26.3.2-2-Linux-x86_64.sh \ |
| 18 | -o /tmp/miniconda.sh && \ | 18 | -o /tmp/miniconda.sh && \ |
| 19 | bash /tmp/miniconda.sh -b -p /usr/local/miniconda3 && \ | 19 | bash /tmp/miniconda.sh -b -p /usr/local/miniconda3 && \ |
| 20 | rm /tmp/miniconda.sh && \ | 20 | rm /tmp/miniconda.sh && \ |
| ... | @@ -69,7 +69,7 @@ RUN apt-get update && \ | ... | @@ -69,7 +69,7 @@ RUN apt-get update && \ |
| 69 | 69 | ||
| 70 | # Create non-root user | 70 | # Create non-root user |
| 71 | RUN useradd -m -s /bin/bash user && \ | 71 | RUN useradd -m -s /bin/bash user && \ |
| 72 | echo "user:user" | chpasswd && \ | 72 | echo "user:123456" | chpasswd && \ |
| 73 | adduser user sudo && \ | 73 | adduser user sudo && \ |
| 74 | echo "user ALL=(ALL) NOPASSWD:ALL" >> /etc/sudoers | 74 | echo "user ALL=(ALL) NOPASSWD:ALL" >> /etc/sudoers |
| 75 | 75 | ||
| ... | @@ -97,9 +97,11 @@ COPY scripts/ /home/user/scripts/ | ... | @@ -97,9 +97,11 @@ COPY scripts/ /home/user/scripts/ |
| 97 | RUN chown -R user:user /home/user/scripts && \ | 97 | RUN chown -R user:user /home/user/scripts && \ |
| 98 | chmod +x /home/user/scripts/*.sh | 98 | chmod +x /home/user/scripts/*.sh |
| 99 | 99 | ||
| 100 | # oh-my-zsh | 100 | # oh-my-zsh (install as user so config lands in /home/user/) |
| 101 | RUN RUNZSH=no CHSH=no sh -c "$(curl -fsSL https://raw.githubusercontent.com/ohmyzsh/ohmyzsh/master/tools/install.sh)" && \ | 101 | USER user |
| 102 | chsh -s $(which zsh) user | 102 | RUN RUNZSH=no CHSH=no sh -c "$(curl -fsSL https://raw.githubusercontent.com/ohmyzsh/ohmyzsh/master/tools/install.sh)" |
| 103 | USER root | ||
| 104 | RUN chsh -s $(which zsh) user | ||
| 103 | 105 | ||
| 104 | # Neovim | 106 | # Neovim |
| 105 | RUN curl -fsSL https://github.com/neovim/neovim/releases/download/v0.12.2/nvim-linux-x86_64.tar.gz \ | 107 | RUN curl -fsSL https://github.com/neovim/neovim/releases/download/v0.12.2/nvim-linux-x86_64.tar.gz \ | ... | ... |
| ... | @@ -14,7 +14,7 @@ RUN apt-get update && \ | ... | @@ -14,7 +14,7 @@ RUN apt-get update && \ |
| 14 | rm -rf /var/lib/apt/lists/* | 14 | rm -rf /var/lib/apt/lists/* |
| 15 | 15 | ||
| 16 | # Python (Miniconda) | 16 | # Python (Miniconda) |
| 17 | RUN curl -sSLk https://mirrors.tuna.tsinghua.edu.cn/anaconda/miniconda/Miniconda3-py310_23.11.0-2-Linux-x86_64.sh \ | 17 | RUN curl -sSLk https://mirrors.tuna.tsinghua.edu.cn/anaconda/miniconda/Miniconda3-py312_26.3.2-2-Linux-x86_64.sh \ |
| 18 | -o /tmp/miniconda.sh && \ | 18 | -o /tmp/miniconda.sh && \ |
| 19 | bash /tmp/miniconda.sh -b -p /usr/local/miniconda3 && \ | 19 | bash /tmp/miniconda.sh -b -p /usr/local/miniconda3 && \ |
| 20 | rm /tmp/miniconda.sh && \ | 20 | rm /tmp/miniconda.sh && \ |
| ... | @@ -69,7 +69,7 @@ RUN apt-get update && \ | ... | @@ -69,7 +69,7 @@ RUN apt-get update && \ |
| 69 | 69 | ||
| 70 | # Create non-root user | 70 | # Create non-root user |
| 71 | RUN useradd -m -s /bin/bash user && \ | 71 | RUN useradd -m -s /bin/bash user && \ |
| 72 | echo "user:user" | chpasswd && \ | 72 | echo "user:123456" | chpasswd && \ |
| 73 | adduser user sudo && \ | 73 | adduser user sudo && \ |
| 74 | echo "user ALL=(ALL) NOPASSWD:ALL" >> /etc/sudoers | 74 | echo "user ALL=(ALL) NOPASSWD:ALL" >> /etc/sudoers |
| 75 | 75 | ||
| ... | @@ -115,9 +115,11 @@ RUN code-server --install-extension golang.go \ | ... | @@ -115,9 +115,11 @@ RUN code-server --install-extension golang.go \ |
| 115 | 115 | ||
| 116 | USER root | 116 | USER root |
| 117 | 117 | ||
| 118 | # oh-my-zsh | 118 | # oh-my-zsh (install as user so config lands in /home/user/) |
| 119 | RUN RUNZSH=no CHSH=no sh -c "$(curl -fsSL https://raw.githubusercontent.com/ohmyzsh/ohmyzsh/master/tools/install.sh)" && \ | 119 | USER user |
| 120 | chsh -s $(which zsh) user | 120 | RUN RUNZSH=no CHSH=no sh -c "$(curl -fsSL https://raw.githubusercontent.com/ohmyzsh/ohmyzsh/master/tools/install.sh)" |
| 121 | USER root | ||
| 122 | RUN chsh -s $(which zsh) user | ||
| 121 | 123 | ||
| 122 | # Neovim | 124 | # Neovim |
| 123 | RUN curl -fsSL https://github.com/neovim/neovim/releases/download/v0.12.2/nvim-linux-x86_64.tar.gz \ | 125 | RUN curl -fsSL https://github.com/neovim/neovim/releases/download/v0.12.2/nvim-linux-x86_64.tar.gz \ | ... | ... |
-
Please register or sign in to post a comment