-
-
Notifications
You must be signed in to change notification settings - Fork 21
/
lite.Dockerfile
38 lines (33 loc) · 1.3 KB
/
lite.Dockerfile
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
# getter < https://t.me/kastaid >
# Copyright (C) 2022-present kastaid
#
# This file is a part of < https://github.com/kastaid/getter/ >
# Please read the GNU Affero General Public License in
# < https://github.com/kastaid/getter/blob/main/LICENSE/ >.
FROM python:3.12-slim-bookworm
ENV TZ=Asia/Jakarta \
TERM=xterm-256color \
DEBIAN_FRONTEND=noninteractive \
VIRTUAL_ENV=/opt/venv \
PATH=/opt/venv/bin:/app/bin:$PATH
ARG LANG=en_US
WORKDIR /app
COPY . .
RUN set -ex \
&& apt-get -qqy update \
&& apt-get -qqy install --no-install-recommends \
gnupg2 \
git \
locales \
tzdata \
build-essential \
&& localedef --quiet -i ${LANG} -c -f UTF-8 -A /usr/share/locale/locale.alias ${LANG}.UTF-8 \
&& ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone \
&& dpkg-reconfigure --force -f noninteractive tzdata >/dev/null 2>&1 \
&& python3 -m venv $VIRTUAL_ENV \
&& pip3 install --disable-pip-version-check --default-timeout=100 -r requirements.txt \
&& apt-get -qqy purge --auto-remove \
build-essential \
&& apt-get -qqy clean \
&& rm -rf -- /var/lib/apt/lists/* /var/cache/apt/archives/* /etc/apt/sources.list.d/* /usr/share/man/* /usr/share/doc/* /var/log/* /tmp/* /var/tmp/*
CMD ["python3", "-m", "getter"]