Add simplified Dockerfile for TeleBot using pre-built binaries
This commit is contained in:
parent
71ad637804
commit
c0b3a47cd8
28
Dockerfile.telebot-simple
Normal file
28
Dockerfile.telebot-simple
Normal file
@ -0,0 +1,28 @@
|
|||||||
|
# Use pre-built TeleBot binaries
|
||||||
|
FROM mcr.microsoft.com/dotnet/aspnet:9.0 AS runtime
|
||||||
|
WORKDIR /app
|
||||||
|
|
||||||
|
# Install required packages
|
||||||
|
RUN apt-get update && \
|
||||||
|
apt-get install -y procps curl && \
|
||||||
|
rm -rf /var/lib/apt/lists/*
|
||||||
|
|
||||||
|
# Copy pre-built TeleBot release
|
||||||
|
COPY telebot-release.tar.gz /tmp/
|
||||||
|
RUN tar xzf /tmp/telebot-release.tar.gz -C /app --strip-components=1 && \
|
||||||
|
rm /tmp/telebot-release.tar.gz
|
||||||
|
|
||||||
|
# Create necessary directories
|
||||||
|
RUN mkdir -p /app/data /app/logs /app/image_cache && \
|
||||||
|
chmod 755 /app/data /app/logs /app/image_cache
|
||||||
|
|
||||||
|
# Set environment variables
|
||||||
|
ENV DOTNET_ENVIRONMENT=Production
|
||||||
|
ENV TZ=UTC
|
||||||
|
|
||||||
|
# Health check
|
||||||
|
HEALTHCHECK --interval=30s --timeout=10s --start-period=60s --retries=3 \
|
||||||
|
CMD pgrep -f "dotnet.*TeleBot" > /dev/null || exit 1
|
||||||
|
|
||||||
|
# Run the application
|
||||||
|
ENTRYPOINT ["dotnet", "TeleBot.dll"]
|
||||||
Loading…
Reference in New Issue
Block a user