frert / Dockerfile
dracoox's picture
Update Dockerfile
971ea5d verified
FROM ubuntu:22.04
ENV DEBIAN_FRONTEND=noninteractive
ENV PORT=7860
RUN apt update && apt upgrade -y && \
apt install -y \
python3 python3-pip \
curl wget git \
openssh-client \
ffmpeg \
speedtest-cli \
neofetch \
procps \
ca-certificates \
build-essential \
sudo \
tmate && \
apt clean && rm -rf /var/lib/apt/lists/*
# Create user draco with UID 1000 and no password
RUN useradd -m -u 1000 -s /bin/bash draco && \
echo "draco ALL=(ALL) NOPASSWD:ALL" >> /etc/sudoers
# Install latest Node.js v20 and npm from NodeSource
RUN curl -fsSL https://deb.nodesource.com/setup_20.x | bash - && \
apt install -y nodejs && \
npm install -g npm@latest
# Install Python Telegram Bot API
RUN pip3 install --no-cache-dir pytelegrambotapi
# Create app directory for draco
RUN mkdir -p /home/draco/app && \
chown -R draco:draco /home/draco/app
USER draco
WORKDIR /home/draco/app
RUN echo "Tmate Session Running..." > index.html
CMD python3 -m http.server $PORT & tmate -F