mirror of
https://github.com/krahets/hello-algo.git
synced 2026-11-23 23:21:33 +08:00
- Zig (all six editions): delete the 38 chapter files that build.zig never built and the stale include/ module (plus two zh-hant orphans); build.zig keeps the two built chapters, drops the temporary allowlist and fails instead of skipping directory or module errors. The Zig workflow also builds the English edition. - codes/Dockerfile (all six editions): a language without an installation workflow now prints an error to stderr and exits 1 instead of printing a warning. - ru PythonTutor: regenerate all 126 links; 18 snippets over the 5,600-byte payload budget drop their comments, and the quick sort tail-recursion caption is corrected. Co-authored-by: Claude Opus 5.5 <[email protected]>
36 lines
1.2 KiB
Docker
36 lines
1.2 KiB
Docker
FROM ubuntu:latest
|
|
|
|
# Use Ubuntu image from Aliyun
|
|
RUN sed -i 's/archive.ubuntu.com/mirrors.aliyun.com/g' /etc/apt/sources.list && \
|
|
sed -i 's/security.ubuntu.com/mirrors.aliyun.com/g' /etc/apt/sources.list && \
|
|
sed -i 's/ports.ubuntu.com/mirrors.aliyun.com/g' /etc/apt/sources.list
|
|
|
|
RUN apt-get update && apt-get install -y wget
|
|
|
|
# Install languages environment
|
|
ARG LANGS
|
|
RUN for LANG in $LANGS; do \
|
|
case $LANG in \
|
|
python) \
|
|
apt-get install -y python3.10 && \
|
|
update-alternatives --install /usr/bin/python python /usr/bin/python3.10 1 ;; \
|
|
cpp) \
|
|
apt-get install -y g++ gdb ;; \
|
|
java) \
|
|
apt-get install -y openjdk-17-jdk ;; \
|
|
csharp) \
|
|
wget https://packages.microsoft.com/config/ubuntu/20.04/packages-microsoft-prod.deb -O packages-microsoft-prod.deb && \
|
|
dpkg -i packages-microsoft-prod.deb && \
|
|
apt-get update && \
|
|
apt-get install -y dotnet-sdk-8.0 ;; \
|
|
# More languages...
|
|
*) \
|
|
echo "Error: No installation workflow for $LANG" >&2; exit 1 ;; \
|
|
esac \
|
|
done
|
|
|
|
WORKDIR /codes
|
|
COPY ./ ./
|
|
|
|
CMD ["/bin/bash"]
|