Create Dockerfile
Browse files- Dockerfile +41 -0
Dockerfile
ADDED
|
@@ -0,0 +1,41 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 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 \
|
| 10 |
+
sudo \
|
| 11 |
+
supervisor \
|
| 12 |
+
&& curl -fsSL https://deb.nodesource.com/setup_18.x | bash - \
|
| 13 |
+
&& apt-get install -y nodejs \
|
| 14 |
+
&& rm -rf /var/lib/apt/lists/*
|
| 15 |
+
|
| 16 |
+
# Install OpenVSCode Server (the browser-based VS Code interface)
|
| 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 |
+
# Globally install the freebuff coding agent tool
|
| 20 |
+
RUN npm install -g freebuff
|
| 21 |
+
|
| 22 |
+
# Enforce Hugging Face required User ID 1000 for strict sandbox permission compliance
|
| 23 |
+
RUN useradd -m -u 1000 user && \
|
| 24 |
+
echo "user ALL=(ALL) NOPASSWD:ALL" >> /etc/sudoers
|
| 25 |
+
|
| 26 |
+
# Create workspace and guarantee write access ownership for the non-root execution context
|
| 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 layout process supervisor configurations
|
| 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"]
|