-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdockefile.full
46 lines (31 loc) · 1.09 KB
/
dockefile.full
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
40
41
42
43
44
45
46
FROM ubuntu:latest
ENV DEBIAN_FRONTEND noninteractive
LABEL maintainer="Nehcy <[email protected]>"
ARG NB_USER="wald"
ARG NB_UID="1000"
ARG NB_GID="100"
ARG NB_DIR="work"
RUN apt-get update --yes && \
apt-get upgrade --yes && \
apt-get install --yes --no-install-recommends \
pip python3 python-is-python3 \
python3-dev build-essential git && \
apt-get clean && rm -rf /var/lib/apt/lists/*
# Create NB_USER with name NB_USER user with UID=1000 and in the 'users' group
#chmod g+w /etc/passwd && \
RUN useradd -l -m -s /bin/bash -N -u "${NB_UID}" "${NB_USER}" # && \
chown "${NB_USER}:${NB_GID}" "/home/${NB_USER}/"
USER "${NB_UID}"
WORKDIR "/home/${NB_USER}/"
ENV PATH="$PATH:/home/${NB_USER}/.local/bin"
# COPY requirements.txt ./
RUN python -m pip install --user --upgrade pip && \
pip install TelegramBotAPI shortuuid pyyaml munch && \
python -m pip cache purge
WORKDIR "./${NB_DIR}"
#COPY ./src/ ./
ARG TG_TOKEN=""
ENV TG_TOKEN="${TG_TOKEN}"
# Configure container startup: if not use compose
# if use doker standalone uncomemnt next
#CMD ["python", "main.py"]