Spaces:
Runtime error
Runtime error
Update Dockerfile
Browse files- Dockerfile +12 -41
Dockerfile
CHANGED
|
@@ -2,7 +2,6 @@ FROM codercom/code-server:latest
|
|
| 2 |
|
| 3 |
USER root
|
| 4 |
|
| 5 |
-
# Install system packages
|
| 6 |
RUN apt-get update && apt-get install -y \
|
| 7 |
sudo \
|
| 8 |
curl \
|
|
@@ -17,39 +16,25 @@ RUN apt-get update && apt-get install -y \
|
|
| 17 |
jq \
|
| 18 |
ca-certificates \
|
| 19 |
gnupg \
|
| 20 |
-
build-essential \
|
| 21 |
-
gcc \
|
| 22 |
-
g++ \
|
| 23 |
-
make \
|
| 24 |
-
cmake \
|
| 25 |
python3 \
|
| 26 |
python3-pip \
|
| 27 |
python3-venv \
|
| 28 |
python3-dev \
|
| 29 |
chromium \
|
| 30 |
chromium-driver \
|
| 31 |
-
|
| 32 |
-
|
| 33 |
-
xdg-utils \
|
| 34 |
-
net-tools \
|
| 35 |
-
iputils-ping \
|
| 36 |
-
dnsutils \
|
| 37 |
-
openssh-client \
|
| 38 |
-
procps \
|
| 39 |
-
rsync \
|
| 40 |
-
sqlite3 \
|
| 41 |
-
openjdk-21-jdk \
|
| 42 |
&& rm -rf /var/lib/apt/lists/*
|
| 43 |
|
| 44 |
-
#
|
| 45 |
RUN curl -fsSL https://deb.nodesource.com/setup_22.x | bash - && \
|
| 46 |
-
apt-get
|
| 47 |
-
apt-get
|
| 48 |
|
| 49 |
# Upgrade pip
|
| 50 |
-
RUN python3 -m pip install --upgrade pip setuptools wheel
|
| 51 |
|
| 52 |
-
#
|
| 53 |
RUN pip3 install --no-cache-dir \
|
| 54 |
selenium \
|
| 55 |
webdriver-manager \
|
|
@@ -63,42 +48,28 @@ RUN pip3 install --no-cache-dir \
|
|
| 63 |
flask \
|
| 64 |
fastapi \
|
| 65 |
uvicorn \
|
| 66 |
-
jupyter \
|
| 67 |
-
notebook \
|
| 68 |
-
playwright \
|
| 69 |
-
pillow \
|
| 70 |
-
rich \
|
| 71 |
python-dotenv \
|
| 72 |
-
pyyaml
|
| 73 |
-
|
| 74 |
-
# Install Playwright browser
|
| 75 |
-
RUN playwright install chromium
|
| 76 |
|
| 77 |
-
#
|
| 78 |
RUN npm install -g \
|
| 79 |
yarn \
|
| 80 |
pnpm \
|
| 81 |
typescript \
|
| 82 |
ts-node \
|
| 83 |
nodemon \
|
| 84 |
-
pm2
|
| 85 |
-
eslint \
|
| 86 |
-
prettier \
|
| 87 |
-
vite \
|
| 88 |
-
create-vite
|
| 89 |
|
| 90 |
-
# Environment variables for Selenium
|
| 91 |
ENV CHROME_BIN=/usr/bin/chromium
|
| 92 |
ENV CHROMEDRIVER=/usr/bin/chromedriver
|
| 93 |
|
| 94 |
-
# Create workspace
|
| 95 |
RUN mkdir -p /home/coder/project && \
|
| 96 |
chown -R coder:coder /home/coder/project
|
| 97 |
|
| 98 |
USER coder
|
| 99 |
WORKDIR /home/coder/project
|
| 100 |
|
| 101 |
-
# Expose code-server on port 7680
|
| 102 |
EXPOSE 7680
|
| 103 |
|
| 104 |
-
CMD ["code-server",
|
|
|
|
| 2 |
|
| 3 |
USER root
|
| 4 |
|
|
|
|
| 5 |
RUN apt-get update && apt-get install -y \
|
| 6 |
sudo \
|
| 7 |
curl \
|
|
|
|
| 16 |
jq \
|
| 17 |
ca-certificates \
|
| 18 |
gnupg \
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 19 |
python3 \
|
| 20 |
python3-pip \
|
| 21 |
python3-venv \
|
| 22 |
python3-dev \
|
| 23 |
chromium \
|
| 24 |
chromium-driver \
|
| 25 |
+
build-essential \
|
| 26 |
+
&& apt-get clean \
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 27 |
&& rm -rf /var/lib/apt/lists/*
|
| 28 |
|
| 29 |
+
# Node.js 22
|
| 30 |
RUN curl -fsSL https://deb.nodesource.com/setup_22.x | bash - && \
|
| 31 |
+
apt-get install -y nodejs && \
|
| 32 |
+
apt-get clean
|
| 33 |
|
| 34 |
# Upgrade pip
|
| 35 |
+
RUN python3 -m pip install --no-cache-dir --upgrade pip setuptools wheel
|
| 36 |
|
| 37 |
+
# Python packages
|
| 38 |
RUN pip3 install --no-cache-dir \
|
| 39 |
selenium \
|
| 40 |
webdriver-manager \
|
|
|
|
| 48 |
flask \
|
| 49 |
fastapi \
|
| 50 |
uvicorn \
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 51 |
python-dotenv \
|
| 52 |
+
pyyaml \
|
| 53 |
+
rich
|
|
|
|
|
|
|
| 54 |
|
| 55 |
+
# Global npm packages
|
| 56 |
RUN npm install -g \
|
| 57 |
yarn \
|
| 58 |
pnpm \
|
| 59 |
typescript \
|
| 60 |
ts-node \
|
| 61 |
nodemon \
|
| 62 |
+
pm2
|
|
|
|
|
|
|
|
|
|
|
|
|
| 63 |
|
|
|
|
| 64 |
ENV CHROME_BIN=/usr/bin/chromium
|
| 65 |
ENV CHROMEDRIVER=/usr/bin/chromedriver
|
| 66 |
|
|
|
|
| 67 |
RUN mkdir -p /home/coder/project && \
|
| 68 |
chown -R coder:coder /home/coder/project
|
| 69 |
|
| 70 |
USER coder
|
| 71 |
WORKDIR /home/coder/project
|
| 72 |
|
|
|
|
| 73 |
EXPOSE 7680
|
| 74 |
|
| 75 |
+
CMD ["code-server","--bind-addr","0.0.0.0:7680","/home/coder/project"]
|