Update Dockerfile
Browse files- Dockerfile +10 -10
Dockerfile
CHANGED
|
@@ -1,22 +1,22 @@
|
|
| 1 |
FROM mcr.microsoft.com/dotnet/sdk:8.0
|
| 2 |
WORKDIR /app
|
| 3 |
|
| 4 |
-
#
|
| 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 |
-
#
|
| 12 |
-
RUN
|
| 13 |
-
|
| 14 |
-
|
| 15 |
-
|
|
|
|
|
|
|
|
|
|
| 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"]
|