wip dockerfile

This commit is contained in:
Toastie 2025-02-11 14:05:44 +13:00
parent 4f1cdde9b2
commit 343e74be6b
Signed by: toastie_t0ast
GPG key ID: 0861BE54AD481DC7

View file

@ -28,17 +28,17 @@ RUN dotnet publish -c Release -o /app --self-contained -r linux-x64 --no-restore
FROM debian:12.9-slim
WORKDIR /app
ADD --chmod=755 https://github.com/yt-dlp/yt-dlp/releases/latest/download/yt-dlp /usr/local/bin/yt-dlp
# Create a new user, install dependencies, and set up sudoers file
RUN apt update; \
apt install -y --no-install-recommends curl ffmpeg python3; \
curl -Lo /usr/local/bin/yt-dlp https://github.com/yt-dlp/yt-dlp/releases/latest/download/yt-dlp; \
chmod a+rx /usr/local/bin/yt-dlp; \
apt install -y --no-install-recommends ffmpeg python3; \
apt autoremove -y; \
apt clean -y;
# Copy the built application and the entrypoint script from the build stage
COPY --from=build /app ./
COPY docker-entrypoint.sh /usr/local/sbin
COPY --chmod=755 docker-entrypoint.sh /usr/local/sbin/
# Set environment variables
ENV shard_id=0
@ -49,5 +49,4 @@ VOLUME [ "/app/data" ]
# Set the entrypoint and default command
ENTRYPOINT [ "/usr/local/sbin/docker-entrypoint.sh" ]
CMD yt-dlp -U &2>/dev/null
CMD dotnet EllieBot.dll "$shard_id" "$total_shards"
CMD ./EllieBot