mirror of
https://github.com/krahets/hello-algo.git
synced 2025-01-23 06:00:27 +08:00
feat: add csharp sdk to dockerfile (#929)
* feature: add csharp sdk to dockerfile * Update docker-compose.yml * Update Dockerfile * remove env file --------- Co-authored-by: Yudong Jin <krahets@163.com>
This commit is contained in:
parent
d5ee877fd8
commit
99fd891d76
@ -5,13 +5,10 @@ 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
|
||||
RUN apt-get update && apt-get install -y wget
|
||||
|
||||
# 设置需要安装的语言,使用空格隔开
|
||||
# Set the languages to be installed, separated by spaces
|
||||
ARG LANGS="python cpp"
|
||||
|
||||
# Available languages:python cpp java
|
||||
# Install languages environment
|
||||
ARG LANGS
|
||||
RUN for LANG in $LANGS; do \
|
||||
case "$LANG" in \
|
||||
python) \
|
||||
@ -21,6 +18,11 @@ RUN for LANG in $LANGS; do \
|
||||
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-6.0 ;; \
|
||||
# More languages...
|
||||
*) \
|
||||
echo "Warning: No installation workflow for $LANG" ;; \
|
||||
|
@ -1,7 +1,12 @@
|
||||
version: '3.8'
|
||||
services:
|
||||
hello-algo-code:
|
||||
build: .
|
||||
build:
|
||||
context: .
|
||||
args:
|
||||
# 设置需要安装的语言,使用空格隔开
|
||||
# Set the languages to be installed, separated by spaces
|
||||
LANGS: "python cpp csharp"
|
||||
image: hello-algo-code
|
||||
container_name: hello-algo-code
|
||||
stdin_open: true
|
||||
|
Loading…
Reference in New Issue
Block a user