Add custom deb support

This commit is contained in:
2025-11-30 14:37:12 +01:00
orang tua c033dca8d2
melakukan 05007461aa
2 mengubah file dengan 12 tambahan dan 2 penghapusan

4
.gitignore vendored
Melihat File

@@ -10,6 +10,8 @@ dist/
tmp/ tmp/
*.out *.out
# Ignora file di configurazione locali # Ignora file di configurazione locali
.env .env
*.local *.local
@@ -23,3 +25,5 @@ tmp/
# (Facoltativo) Ignora file Containerfile se non vuoi versionarli # (Facoltativo) Ignora file Containerfile se non vuoi versionarli
# Containerfile # Containerfile
Services/lemonade/*.deb

Melihat File

@@ -11,12 +11,18 @@ USER root
EXPOSE 8000 EXPOSE 8000
# Install Lemonade SDK # Install Lemonade SDK
COPY *.deb /tmp/
RUN apt-get update && apt-get install -y nano unzip wget curl jq pciutils ffmpeg libatomic1 && \ RUN apt-get update && apt-get install -y nano unzip wget curl jq pciutils ffmpeg libatomic1 && \
apt-get clean && rm -rf /var/lib/apt/lists/* && \ apt-get clean && rm -rf /var/lib/apt/lists/* && \
update-pciids && \ update-pciids && \
VERSION=$(curl -s https://api.github.com/repos/lemonade-sdk/lemonade/releases/latest | jq -r .tag_name | sed 's/^v//') && \ VERSION=$(curl -s https://api.github.com/repos/lemonade-sdk/lemonade/releases/latest | jq -r .tag_name | sed 's/^v//') && \
DEB_FILE=$(ls /tmp/*.deb 2>/dev/null | head -1) && \
if [ -n "$DEB_FILE" ]; then \
cp "$DEB_FILE" /tmp/lemonade-server-minimal.deb; \
else \
wget -O /tmp/lemonade-server-minimal.deb \ wget -O /tmp/lemonade-server-minimal.deb \
https://github.com/lemonade-sdk/lemonade/releases/download/v${VERSION}/lemonade-server-minimal_${VERSION}_amd64.deb && \ https://github.com/lemonade-sdk/lemonade/releases/download/v${VERSION}/lemonade-server-minimal_${VERSION}_amd64.deb; \
fi && \
dpkg -i /tmp/lemonade-server-minimal.deb || apt-get install -fy && \ dpkg -i /tmp/lemonade-server-minimal.deb || apt-get install -fy && \
rm /tmp/lemonade-server-minimal.deb rm /tmp/lemonade-server-minimal.deb