Update Dockerfile
Browse files- Dockerfile +23 -80
Dockerfile
CHANGED
|
@@ -1,88 +1,31 @@
|
|
| 1 |
-
# Use
|
| 2 |
-
FROM
|
| 3 |
|
| 4 |
-
#
|
| 5 |
-
|
| 6 |
-
|
| 7 |
-
# Install necessary packages
|
| 8 |
-
RUN apt-get update && \
|
| 9 |
-
apt-get install -y \
|
| 10 |
-
curl \
|
| 11 |
-
sudo \
|
| 12 |
build-essential \
|
| 13 |
-
|
| 14 |
-
|
| 15 |
-
|
| 16 |
-
|
| 17 |
-
|
| 18 |
-
fish \
|
| 19 |
-
ffmpeg \
|
| 20 |
-
nmap \
|
| 21 |
-
ca-certificates \
|
| 22 |
-
debootstrap \
|
| 23 |
curl
|
| 24 |
|
| 25 |
-
#
|
| 26 |
-
RUN
|
| 27 |
-
apt-get install -y nodejs
|
| 28 |
-
|
| 29 |
-
# Install code-server
|
| 30 |
-
RUN curl -fsSL https://code-server.dev/install.sh | sh -s -- --version=4.23.0-rc.2
|
| 31 |
-
|
| 32 |
-
# Install ollama
|
| 33 |
-
RUN curl -fsSL https://ollama.com/install.sh | sh
|
| 34 |
-
|
| 35 |
-
# Create a user to run code-server
|
| 36 |
-
RUN useradd -m -s /bin/bash coder && \
|
| 37 |
-
echo 'coder ALL=(ALL) NOPASSWD:ALL' >> /etc/sudoers
|
| 38 |
-
|
| 39 |
-
# Create and set the working directory
|
| 40 |
-
RUN mkdir -p /home/coder/genz/roop
|
| 41 |
-
WORKDIR /home/coder/genz/roop
|
| 42 |
-
|
| 43 |
-
# Clone the roop repository
|
| 44 |
-
RUN git clone https://github.com/s0md3v/roop.git .
|
| 45 |
-
|
| 46 |
-
# Change ownership and permissions of the roop directory and its contents
|
| 47 |
-
RUN chown -R coder:coder /home/coder/genz/roop && \
|
| 48 |
-
chmod -R u+rwx /home/coder/genz/roop
|
| 49 |
-
|
| 50 |
-
# Create code-server configuration directory
|
| 51 |
-
RUN mkdir -p /home/coder/.local/share/code-server/User
|
| 52 |
-
|
| 53 |
-
# Add settings.json to enable dark mode
|
| 54 |
-
RUN echo '{ \
|
| 55 |
-
"workbench.colorTheme": "Default Dark Modern", \
|
| 56 |
-
"telemetry.enableTelemetry": true, \
|
| 57 |
-
"telemetry.enableCrashReporter": true \
|
| 58 |
-
}' > /home/coder/.local/share/code-server/User/settings.json
|
| 59 |
-
|
| 60 |
-
# Change ownership of the configuration directory
|
| 61 |
-
RUN chown -R coder:coder /home/coder/.local/share/code-server
|
| 62 |
-
|
| 63 |
-
# Install Python extension for code-server
|
| 64 |
-
RUN sudo -u coder code-server --install-extension ms-python.python
|
| 65 |
-
|
| 66 |
-
# Expose the default code-server port
|
| 67 |
-
EXPOSE 8080
|
| 68 |
-
|
| 69 |
-
# Create a minimal Debian system using debootstrap
|
| 70 |
-
RUN mkdir /chroot && \
|
| 71 |
-
debootstrap --variant=minbase buster /chroot http://deb.debian.org/debian/
|
| 72 |
|
| 73 |
-
#
|
| 74 |
-
|
| 75 |
-
|
| 76 |
-
|
|
|
|
|
|
|
| 77 |
|
| 78 |
-
#
|
| 79 |
-
|
| 80 |
-
chroot /chroot /bin/bash -c "cd /home/coder/genz && code-server --bind-addr 0.0.0.0:8080 --auth none"' > /home/coder/start.sh && \
|
| 81 |
-
chmod +x /home/coder/start.sh
|
| 82 |
|
| 83 |
-
#
|
| 84 |
-
|
| 85 |
-
WORKDIR /home/coder/genz
|
| 86 |
|
| 87 |
-
#
|
| 88 |
-
|
|
|
|
| 1 |
+
# Use the latest official Ubuntu as a parent image
|
| 2 |
+
FROM ubuntu:latest
|
| 3 |
|
| 4 |
+
# Install dependencies
|
| 5 |
+
RUN apt-get update && apt-get install -y \
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 6 |
build-essential \
|
| 7 |
+
cmake \
|
| 8 |
+
git \
|
| 9 |
+
libwebsockets-dev \
|
| 10 |
+
libjson-c-dev \
|
| 11 |
+
libssl-dev \
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 12 |
curl
|
| 13 |
|
| 14 |
+
# Clone the ttyd repository
|
| 15 |
+
RUN git clone https://github.com/tsl0922/ttyd.git
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 16 |
|
| 17 |
+
# Build ttyd
|
| 18 |
+
WORKDIR ttyd
|
| 19 |
+
RUN mkdir build
|
| 20 |
+
WORKDIR build
|
| 21 |
+
RUN cmake ..
|
| 22 |
+
RUN make && make install
|
| 23 |
|
| 24 |
+
# Set the command to run ttyd
|
| 25 |
+
ENTRYPOINT ["ttyd"]
|
|
|
|
|
|
|
| 26 |
|
| 27 |
+
# Set the default arguments for ttyd
|
| 28 |
+
CMD ["-p", "7860", "--address", "0.0.0.0", "bash"]
|
|
|
|
| 29 |
|
| 30 |
+
# Expose the port ttyd will run on
|
| 31 |
+
EXPOSE 7860
|