mirror of
https://github.com/krahets/hello-algo.git
synced 2025-02-02 22:43:50 +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/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
|
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
|
||||||
|
|
||||||
# 设置需要安装的语言,使用空格隔开
|
# Install languages environment
|
||||||
# Set the languages to be installed, separated by spaces
|
ARG LANGS
|
||||||
ARG LANGS="python cpp"
|
|
||||||
|
|
||||||
# Available languages:python cpp java
|
|
||||||
RUN for LANG in $LANGS; do \
|
RUN for LANG in $LANGS; do \
|
||||||
case "$LANG" in \
|
case "$LANG" in \
|
||||||
python) \
|
python) \
|
||||||
@ -21,6 +18,11 @@ RUN for LANG in $LANGS; do \
|
|||||||
apt-get install -y g++ gdb ;; \
|
apt-get install -y g++ gdb ;; \
|
||||||
java) \
|
java) \
|
||||||
apt-get install -y openjdk-17-jdk ;; \
|
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...
|
# More languages...
|
||||||
*) \
|
*) \
|
||||||
echo "Warning: No installation workflow for $LANG" ;; \
|
echo "Warning: No installation workflow for $LANG" ;; \
|
||||||
|
@ -1,7 +1,12 @@
|
|||||||
version: '3.8'
|
version: '3.8'
|
||||||
services:
|
services:
|
||||||
hello-algo-code:
|
hello-algo-code:
|
||||||
build: .
|
build:
|
||||||
|
context: .
|
||||||
|
args:
|
||||||
|
# 设置需要安装的语言,使用空格隔开
|
||||||
|
# Set the languages to be installed, separated by spaces
|
||||||
|
LANGS: "python cpp csharp"
|
||||||
image: hello-algo-code
|
image: hello-algo-code
|
||||||
container_name: hello-algo-code
|
container_name: hello-algo-code
|
||||||
stdin_open: true
|
stdin_open: true
|
||||||
|
Loading…
Reference in New Issue
Block a user