-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
39 lines (28 loc) · 1.22 KB
/
Dockerfile
File metadata and controls
39 lines (28 loc) · 1.22 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
FROM python:3.11-slim
ENV PYTHONDONTWRITEBYTECODE=1
ENV PYTHONUNBUFFERED=1
WORKDIR /app
# Add labels for metadata
LABEL org.opencontainers.image.title="Aiogram Bot"
LABEL org.opencontainers.image.description="A Telegram bot built with Aiogram for managing car."
LABEL org.opencontainers.image.version="1.0"
LABEL org.opencontainers.image.maintainer="SF-hakaton <your.email@example.com>"
LABEL org.opencontainers.image.source="https://github.com/Sayrrexe/SF-Car-Bot"
# Install necessary packages, including netcat-openbsd
RUN apt-get update && apt-get install -y --no-install-recommends gcc libpq-dev netcat-openbsd && \
apt-get clean && rm -rf /var/lib/apt/lists/*
# Install locales and set up en_US.UTF-8
RUN apt-get update && apt-get install -y locales && \
echo "en_US.UTF-8 UTF-8" > /etc/locale.gen && \
locale-gen en_US.UTF-8 && \
update-locale LANG=en_US.UTF-8 LC_ALL=en_US.UTF-8 && \
dpkg-reconfigure --frontend=noninteractive locales
# Set environment variables for locale
ENV LANG=en_US.UTF-8
ENV LC_ALL=en_US.UTF-8
COPY requirements.txt .
RUN pip install --upgrade pip && pip install -r requirements.txt
COPY . .
RUN chmod +x entrypoint.sh
# Set the entrypoint to your script
ENTRYPOINT ["./entrypoint.sh"]