feat: 模拟头歌评测环境的docker镜像 (#30)

Reviewed-on: PostGuard/Canon#30
This commit is contained in:
jackfiled 2024-04-11 18:07:11 +08:00
parent 1690187c0a
commit e773e666ae
2 changed files with 18 additions and 0 deletions

View File

@ -11,6 +11,7 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "scripts", "scripts", "{CA16
ProjectSection(SolutionItems) = preProject ProjectSection(SolutionItems) = preProject
scripts\build.sh = scripts\build.sh scripts\build.sh = scripts\build.sh
scripts\integration_test.py = scripts\integration_test.py scripts\integration_test.py = scripts\integration_test.py
scripts\Dockerfile-build = scripts\Dockerfile-build
EndProjectSection EndProjectSection
EndProject EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Canon.Tests", "Canon.Tests\Canon.Tests.csproj", "{E5F2B97B-3766-466D-9309-BA361F0CE15E}" Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Canon.Tests", "Canon.Tests\Canon.Tests.csproj", "{E5F2B97B-3766-466D-9309-BA361F0CE15E}"

17
scripts/Dockerfile-build Normal file
View File

@ -0,0 +1,17 @@
FROM ubuntu:20.04
RUN sed -i 's/http:\/\/archive.ubuntu.com/http:\/\/mirrors.tuna.tsinghua.edu.cn\/ubuntu/g' /etc/apt/sources.list
RUN apt update \
&& apt upgrade -y \
&& apt install libc6 libgcc-s1 libgssapi-krb5-2 libicu66 libssl1.1 libstdc++6 zlib1g curl clang zlib1g-dev -y
RUN useradd user -m
USER user:user
WORKDIR /home/user
RUN curl --request GET -sL \
--url 'https://dot.net/v1/dotnet-install.sh'\
--output 'dotnet-install.sh' \
&& chmod +x dotnet-install.sh \
&& ./dotnet-install.sh --channel 8.0
RUN echo 'export DOTNET_ROOT=$HOME/.dotnet' >> /home/user/.bashrc
RUN echo 'export PATH=$PATH:$DOTNET_ROOT:$DOTNET_ROOT/tools' >> /home/user/.bashrc