Update Dockerfile
Browse files- Dockerfile +7 -10
Dockerfile
CHANGED
|
@@ -1,9 +1,7 @@
|
|
| 1 |
FROM ubuntu:22.04
|
| 2 |
|
| 3 |
-
# Prevent interactive prompts during software package configuration
|
| 4 |
ENV DEBIAN_FRONTEND=noninteractive
|
| 5 |
|
| 6 |
-
# Update system and install essential runtime dependencies
|
| 7 |
RUN apt-get update && apt-get install -y \
|
| 8 |
curl \
|
| 9 |
git \
|
|
@@ -13,29 +11,28 @@ RUN apt-get update && apt-get install -y \
|
|
| 13 |
&& apt-get install -y nodejs \
|
| 14 |
&& rm -rf /var/lib/apt/lists/*
|
| 15 |
|
| 16 |
-
# Install OpenVSCode Server
|
| 17 |
RUN curl -fsSL "https://github.com/gitpod-io/openvscode-server/releases/download/openvscode-server-v1.85.1/openvscode-server-v1.85.1-linux-x64.tar.gz" | tar -xz -C /opt
|
| 18 |
|
| 19 |
-
#
|
| 20 |
RUN npm install -g freebuff
|
| 21 |
|
| 22 |
-
# Enforce Hugging Face
|
| 23 |
RUN useradd -m -u 1000 user && \
|
| 24 |
echo "user ALL=(ALL) NOPASSWD:ALL" >> /etc/sudoers
|
| 25 |
|
| 26 |
-
|
| 27 |
-
RUN mkdir -p /home/user/workspace && chown -R user:user /home/user
|
| 28 |
|
| 29 |
USER user
|
| 30 |
ENV HOME=/home/user \
|
| 31 |
PATH=/home/user/.local/bin:$PATH
|
| 32 |
WORKDIR /home/user/workspace
|
| 33 |
|
| 34 |
-
# Copy
|
| 35 |
COPY --chown=user:user supervisord.conf /home/user/supervisord.conf
|
|
|
|
|
|
|
| 36 |
|
| 37 |
-
# Expose required web application delivery routing port
|
| 38 |
EXPOSE 7860
|
| 39 |
|
| 40 |
-
# Initiate runtime sequence via the internal service supervisor layout
|
| 41 |
CMD ["/usr/bin/supervisord", "-c", "/home/user/supervisord.conf"]
|
|
|
|
| 1 |
FROM ubuntu:22.04
|
| 2 |
|
|
|
|
| 3 |
ENV DEBIAN_FRONTEND=noninteractive
|
| 4 |
|
|
|
|
| 5 |
RUN apt-get update && apt-get install -y \
|
| 6 |
curl \
|
| 7 |
git \
|
|
|
|
| 11 |
&& apt-get install -y nodejs \
|
| 12 |
&& rm -rf /var/lib/apt/lists/*
|
| 13 |
|
| 14 |
+
# Install OpenVSCode Server
|
| 15 |
RUN curl -fsSL "https://github.com/gitpod-io/openvscode-server/releases/download/openvscode-server-v1.85.1/openvscode-server-v1.85.1-linux-x64.tar.gz" | tar -xz -C /opt
|
| 16 |
|
| 17 |
+
# Install Freebuff globally
|
| 18 |
RUN npm install -g freebuff
|
| 19 |
|
| 20 |
+
# Enforce Hugging Face strict permissions using User ID 1000
|
| 21 |
RUN useradd -m -u 1000 user && \
|
| 22 |
echo "user ALL=(ALL) NOPASSWD:ALL" >> /etc/sudoers
|
| 23 |
|
| 24 |
+
RUN mkdir -p /home/user/workspace/app && chown -R user:user /home/user
|
|
|
|
| 25 |
|
| 26 |
USER user
|
| 27 |
ENV HOME=/home/user \
|
| 28 |
PATH=/home/user/.local/bin:$PATH
|
| 29 |
WORKDIR /home/user/workspace
|
| 30 |
|
| 31 |
+
# Copy configuration and web code files
|
| 32 |
COPY --chown=user:user supervisord.conf /home/user/supervisord.conf
|
| 33 |
+
COPY --chown=user:user index.html /home/user/workspace/index.html
|
| 34 |
+
COPY --chown=user:user server.js /home/user/workspace/server.js
|
| 35 |
|
|
|
|
| 36 |
EXPOSE 7860
|
| 37 |
|
|
|
|
| 38 |
CMD ["/usr/bin/supervisord", "-c", "/home/user/supervisord.conf"]
|