Update Dockerfile
Browse files- Dockerfile +10 -8
Dockerfile
CHANGED
|
@@ -5,6 +5,7 @@ ENV LANG=en_US.UTF-8
|
|
| 5 |
ENV LANGUAGE=en_US:en
|
| 6 |
ENV LC_ALL=en_US.UTF-8
|
| 7 |
|
|
|
|
| 8 |
RUN apt update && apt upgrade -y && \
|
| 9 |
apt install -y \
|
| 10 |
sudo curl wget git gnupg openssh-client \
|
|
@@ -12,35 +13,36 @@ RUN apt update && apt upgrade -y && \
|
|
| 12 |
ca-certificates software-properties-common \
|
| 13 |
build-essential procps xz-utils net-tools \
|
| 14 |
make ffmpeg nano vim htop unzip zip \
|
| 15 |
-
iputils-ping tree lsof netcat tmux
|
| 16 |
-
|
| 17 |
locale-gen en_US.UTF-8 && \
|
| 18 |
apt clean && rm -rf /var/lib/apt/lists/*
|
| 19 |
|
|
|
|
| 20 |
RUN curl -fsSL https://deb.nodesource.com/setup_22.x | bash - && \
|
| 21 |
apt install -y nodejs && npm install -g npm
|
| 22 |
|
|
|
|
| 23 |
RUN pip3 install speedtest-cli
|
| 24 |
|
|
|
|
| 25 |
RUN useradd -m -s /bin/bash draco && \
|
| 26 |
echo "draco:draco" | chpasswd && \
|
| 27 |
usermod -aG sudo draco && \
|
| 28 |
usermod -u 1000 draco
|
| 29 |
|
|
|
|
| 30 |
RUN mkdir -p /home/draco/.ssh && \
|
| 31 |
ssh-keygen -t rsa -f /home/draco/.ssh/id_rsa -N '' && \
|
| 32 |
chown -R draco:draco /home/draco/.ssh
|
| 33 |
|
| 34 |
-
#
|
| 35 |
-
RUN sed -i 's/port=3389/port=3390/g' /etc/xrdp/xrdp.ini && \
|
| 36 |
-
echo "lxsession -s LXDE -e LXDE" >> /etc/xrdp/startwm.sh
|
| 37 |
-
|
| 38 |
COPY run_tmate.sh /home/draco/run_tmate.sh
|
| 39 |
RUN chmod +x /home/draco/run_tmate.sh && chown draco:draco /home/draco/run_tmate.sh
|
| 40 |
|
| 41 |
USER draco
|
| 42 |
WORKDIR /home/draco
|
| 43 |
|
| 44 |
-
EXPOSE 7890
|
| 45 |
|
| 46 |
-
CMD bash -c "
|
|
|
|
| 5 |
ENV LANGUAGE=en_US:en
|
| 6 |
ENV LC_ALL=en_US.UTF-8
|
| 7 |
|
| 8 |
+
# Install dependencies
|
| 9 |
RUN apt update && apt upgrade -y && \
|
| 10 |
apt install -y \
|
| 11 |
sudo curl wget git gnupg openssh-client \
|
|
|
|
| 13 |
ca-certificates software-properties-common \
|
| 14 |
build-essential procps xz-utils net-tools \
|
| 15 |
make ffmpeg nano vim htop unzip zip \
|
| 16 |
+
iputils-ping tree lsof netcat tmux \
|
| 17 |
+
locales && \
|
| 18 |
locale-gen en_US.UTF-8 && \
|
| 19 |
apt clean && rm -rf /var/lib/apt/lists/*
|
| 20 |
|
| 21 |
+
# Install Node.js 22 and update npm
|
| 22 |
RUN curl -fsSL https://deb.nodesource.com/setup_22.x | bash - && \
|
| 23 |
apt install -y nodejs && npm install -g npm
|
| 24 |
|
| 25 |
+
# Install speedtest-cli
|
| 26 |
RUN pip3 install speedtest-cli
|
| 27 |
|
| 28 |
+
# Create draco user with sudo
|
| 29 |
RUN useradd -m -s /bin/bash draco && \
|
| 30 |
echo "draco:draco" | chpasswd && \
|
| 31 |
usermod -aG sudo draco && \
|
| 32 |
usermod -u 1000 draco
|
| 33 |
|
| 34 |
+
# Generate SSH key
|
| 35 |
RUN mkdir -p /home/draco/.ssh && \
|
| 36 |
ssh-keygen -t rsa -f /home/draco/.ssh/id_rsa -N '' && \
|
| 37 |
chown -R draco:draco /home/draco/.ssh
|
| 38 |
|
| 39 |
+
# Copy script and set permissions
|
|
|
|
|
|
|
|
|
|
| 40 |
COPY run_tmate.sh /home/draco/run_tmate.sh
|
| 41 |
RUN chmod +x /home/draco/run_tmate.sh && chown draco:draco /home/draco/run_tmate.sh
|
| 42 |
|
| 43 |
USER draco
|
| 44 |
WORKDIR /home/draco
|
| 45 |
|
| 46 |
+
EXPOSE 7890
|
| 47 |
|
| 48 |
+
CMD bash -c "./run_tmate.sh & python3 -m http.server 7890"
|