Update Dockerfile
Browse files- Dockerfile +28 -20
Dockerfile
CHANGED
|
@@ -1,27 +1,35 @@
|
|
| 1 |
-
FROM
|
| 2 |
|
| 3 |
-
|
| 4 |
-
RUN apt update && apt install -y wget curl git doas && \
|
| 5 |
-
chmod u+s /usr/bin/doas && \
|
| 6 |
-
echo "permit persist user as root" > /etc/doas.conf && \
|
| 7 |
-
chown root:root /etc/doas.conf && chmod 0400 /etc/doas.conf
|
| 8 |
|
| 9 |
-
#
|
| 10 |
-
RUN
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 11 |
|
| 12 |
-
# Install
|
| 13 |
-
RUN
|
| 14 |
-
ln -s /opt/neofetch/neofetch /usr/local/bin/neofetch
|
| 15 |
|
| 16 |
-
#
|
| 17 |
-
RUN
|
|
|
|
|
|
|
| 18 |
|
| 19 |
-
#
|
| 20 |
-
|
|
|
|
| 21 |
|
| 22 |
-
|
| 23 |
-
ENV HOME=/home/user \
|
| 24 |
-
PATH=/home/user/.local/bin:$PATH
|
| 25 |
|
| 26 |
-
# Start
|
| 27 |
-
CMD
|
|
|
|
| 1 |
+
FROM ubuntu:22.04
|
| 2 |
|
| 3 |
+
ENV DEBIAN_FRONTEND=noninteractive
|
|
|
|
|
|
|
|
|
|
|
|
|
| 4 |
|
| 5 |
+
# Update and upgrade using both apt and apt-get
|
| 6 |
+
RUN apt update && apt upgrade -y && \
|
| 7 |
+
apt-get update && apt-get upgrade -y && \
|
| 8 |
+
apt-get install -y \
|
| 9 |
+
python3 python3-pip \
|
| 10 |
+
nodejs npm \
|
| 11 |
+
tmate \
|
| 12 |
+
openssh-client \
|
| 13 |
+
neofetch \
|
| 14 |
+
git \
|
| 15 |
+
curl \
|
| 16 |
+
procps \
|
| 17 |
+
ca-certificates && \
|
| 18 |
+
apt-get clean && rm -rf /var/lib/apt/lists/*
|
| 19 |
|
| 20 |
+
# Install Telegram bot library
|
| 21 |
+
RUN pip3 install --no-cache-dir pytelegrambotapi
|
|
|
|
| 22 |
|
| 23 |
+
# Generate fresh SSH key for tmate
|
| 24 |
+
RUN mkdir -p /root/.ssh && \
|
| 25 |
+
ssh-keygen -t rsa -f /root/.ssh/id_rsa -N '' && \
|
| 26 |
+
chmod 700 /root/.ssh && chmod 600 /root/.ssh/id_rsa
|
| 27 |
|
| 28 |
+
# Dummy file to keep container alive
|
| 29 |
+
RUN mkdir -p /app && echo "Tmate Session Running..." > /app/index.html
|
| 30 |
+
WORKDIR /app
|
| 31 |
|
| 32 |
+
EXPOSE 7860
|
|
|
|
|
|
|
| 33 |
|
| 34 |
+
# Start dummy HTTP server and tmate session
|
| 35 |
+
CMD python3 -m http.server 7860 & tmate -F
|