Update Dockerfile
Browse files- Dockerfile +22 -18
Dockerfile
CHANGED
@@ -4,33 +4,37 @@ ENV DEBIAN_FRONTEND=noninteractive
|
|
4 |
ENV PORT=7860
|
5 |
|
6 |
RUN apt update && apt upgrade -y && \
|
7 |
-
apt
|
8 |
python3 python3-pip \
|
9 |
-
|
10 |
-
tmate \
|
11 |
openssh-client \
|
12 |
neofetch \
|
13 |
-
git \
|
14 |
-
curl \
|
15 |
procps \
|
16 |
ca-certificates \
|
17 |
build-essential \
|
18 |
-
|
19 |
-
apt
|
20 |
|
21 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
22 |
|
23 |
-
|
24 |
-
|
25 |
-
chmod 700 /root/.ssh && chmod 600 /root/.ssh/id_rsa
|
26 |
|
27 |
-
|
28 |
-
|
|
|
29 |
|
30 |
-
|
31 |
-
WORKDIR /app
|
32 |
|
33 |
-
#
|
34 |
-
|
35 |
|
36 |
-
CMD python3 -m http.server $PORT
|
|
|
4 |
ENV PORT=7860
|
5 |
|
6 |
RUN apt update && apt upgrade -y && \
|
7 |
+
apt install -y \
|
8 |
python3 python3-pip \
|
9 |
+
curl wget git \
|
|
|
10 |
openssh-client \
|
11 |
neofetch \
|
|
|
|
|
12 |
procps \
|
13 |
ca-certificates \
|
14 |
build-essential \
|
15 |
+
sudo && \
|
16 |
+
apt clean && rm -rf /var/lib/apt/lists/*
|
17 |
|
18 |
+
# Create user draco with UID 1000 and no password
|
19 |
+
RUN useradd -m -u 1000 -s /bin/bash draco && \
|
20 |
+
echo "draco ALL=(ALL) NOPASSWD:ALL" >> /etc/sudoers
|
21 |
+
|
22 |
+
# Install latest Node.js v20 and npm from NodeSource
|
23 |
+
RUN curl -fsSL https://deb.nodesource.com/setup_20.x | bash - && \
|
24 |
+
apt install -y nodejs && \
|
25 |
+
npm install -g npm@latest
|
26 |
|
27 |
+
# Install Python Telegram Bot API
|
28 |
+
RUN pip3 install --no-cache-dir pytelegrambotapi
|
|
|
29 |
|
30 |
+
# Create a working directory
|
31 |
+
RUN mkdir -p /home/draco/app && \
|
32 |
+
chown -R draco:draco /home/draco/app
|
33 |
|
34 |
+
USER draco
|
35 |
+
WORKDIR /home/draco/app
|
36 |
|
37 |
+
# Dummy app content
|
38 |
+
RUN echo "Tmate Session Running..." > index.html
|
39 |
|
40 |
+
CMD python3 -m http.server $PORT
|