Cnass commited on
Commit
2ee074e
·
verified ·
1 Parent(s): a7b7005

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +10 -10
Dockerfile CHANGED
@@ -1,22 +1,22 @@
1
  FROM mcr.microsoft.com/dotnet/sdk:8.0
2
  WORKDIR /app
3
 
4
- # Python ve gerekli araçları kur
5
- RUN apt-get update && apt-get install -y python3 python3-pip wget unzip
6
 
7
- # Python kütüphanelerini kur
8
  COPY requirements.txt .
9
  RUN pip3 install --no-cache-dir -r requirements.txt --break-system-packages
10
 
11
- # UndertaleModTool (UMT) Son Sürümünü İndir ve Kur
12
- RUN wget https://github.com/UnderminersTeam/UndertaleModTool/releases/download/0.6.2.0/UndertaleModTool_v0.6.2.0_linux-x64.zip -O umt.zip \
13
- && unzip umt.zip -d umt \
14
- && rm umt.zip \
15
- && chmod +x umt/UndertaleModCli
 
 
 
16
 
17
- # Kendi kodlarımızı kopyala
18
  COPY . .
19
 
20
- # Sunucuyu başlat
21
  EXPOSE 7860
22
  CMD ["uvicorn", "app:app", "--host", "0.0.0.0", "--port", "7860"]
 
1
  FROM mcr.microsoft.com/dotnet/sdk:8.0
2
  WORKDIR /app
3
 
4
+ # Gerekli araçları (İndirme ve JSON okuyucuları) kur
5
+ RUN apt-get update && apt-get install -y python3 python3-pip wget unzip curl jq
6
 
 
7
  COPY requirements.txt .
8
  RUN pip3 install --no-cache-dir -r requirements.txt --break-system-packages
9
 
10
+ # GitHub API ile her zaman çalışan en güncel Linux (Ubuntu) sürümünü otomatik bulur ve indirir
11
+ RUN API_URL="https://api.github.com/repos/UnderminersTeam/UndertaleModTool/releases/tags/bleeding-edge" && \
12
+ DOWNLOAD_URL=$(curl -s $API_URL | jq -r '.assets[] | select(.name | ascii_downcase | test("(ubuntu|linux)")) | .browser_download_url' | head -n 1) && \
13
+ echo "Sistem İçin Bulunan Link: $DOWNLOAD_URL" && \
14
+ wget -qO umt.zip "$DOWNLOAD_URL" && \
15
+ unzip -q umt.zip -d umt && \
16
+ rm umt.zip && \
17
+ find umt -type f -iname "UndertaleModCli*" -exec chmod +x {} \;
18
 
 
19
  COPY . .
20
 
 
21
  EXPOSE 7860
22
  CMD ["uvicorn", "app:app", "--host", "0.0.0.0", "--port", "7860"]