wip dockerfile
This commit is contained in:
parent
4f1cdde9b2
commit
343e74be6b
1 changed files with 5 additions and 6 deletions
11
Dockerfile
11
Dockerfile
|
@ -28,17 +28,17 @@ RUN dotnet publish -c Release -o /app --self-contained -r linux-x64 --no-restore
|
||||||
FROM debian:12.9-slim
|
FROM debian:12.9-slim
|
||||||
WORKDIR /app
|
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
|
# Create a new user, install dependencies, and set up sudoers file
|
||||||
RUN apt update; \
|
RUN apt update; \
|
||||||
apt install -y --no-install-recommends curl ffmpeg python3; \
|
apt install -y --no-install-recommends 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 autoremove -y; \
|
apt autoremove -y; \
|
||||||
apt clean -y;
|
apt clean -y;
|
||||||
|
|
||||||
# Copy the built application and the entrypoint script from the build stage
|
# Copy the built application and the entrypoint script from the build stage
|
||||||
COPY --from=build /app ./
|
COPY --from=build /app ./
|
||||||
COPY docker-entrypoint.sh /usr/local/sbin
|
COPY --chmod=755 docker-entrypoint.sh /usr/local/sbin/
|
||||||
|
|
||||||
# Set environment variables
|
# Set environment variables
|
||||||
ENV shard_id=0
|
ENV shard_id=0
|
||||||
|
@ -49,5 +49,4 @@ VOLUME [ "/app/data" ]
|
||||||
|
|
||||||
# Set the entrypoint and default command
|
# Set the entrypoint and default command
|
||||||
ENTRYPOINT [ "/usr/local/sbin/docker-entrypoint.sh" ]
|
ENTRYPOINT [ "/usr/local/sbin/docker-entrypoint.sh" ]
|
||||||
CMD yt-dlp -U &2>/dev/null
|
CMD ./EllieBot
|
||||||
CMD dotnet EllieBot.dll "$shard_id" "$total_shards"
|
|
Loading…
Add table
Add a link
Reference in a new issue