psyflowz commited on
Commit
117959d
·
verified ·
1 Parent(s): ee343a2

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +38 -7
Dockerfile CHANGED
@@ -2,38 +2,69 @@ FROM codercom/code-server:4.103.2
2
 
3
  USER root
4
 
 
5
  RUN apt-get update && apt-get install -y \
6
  sudo \
7
  curl \
 
8
  git \
 
 
 
 
9
  python3 \
10
  python3-pip \
11
  python3-venv \
12
  chromium \
13
  chromium-driver \
 
 
14
  && rm -rf /var/lib/apt/lists/*
15
 
16
- RUN python3 -m pip install --upgrade pip
 
 
 
 
 
 
 
17
 
 
18
  RUN pip3 install --no-cache-dir \
19
  selenium \
20
  webdriver-manager \
21
  fake-useragent \
22
  requests \
23
  beautifulsoup4 \
24
- flask
25
-
26
- RUN curl -fsSL https://deb.nodesource.com/setup_20.x | bash - && \
27
- apt-get install -y nodejs
 
28
 
29
- RUN npm install -g pnpm yarn
 
 
 
 
 
 
30
 
 
31
  ENV CHROME_BIN=/usr/bin/chromium
32
  ENV CHROMEDRIVER=/usr/bin/chromedriver
33
 
 
 
 
 
 
 
 
34
  USER coder
35
  WORKDIR /home/coder/project
36
 
37
  EXPOSE 7680
38
 
39
- CMD ["code-server","--bind-addr","0.0.0.0:7680","--auth","none","/home/coder/project"]
 
2
 
3
  USER root
4
 
5
+ # Install system dependencies
6
  RUN apt-get update && apt-get install -y \
7
  sudo \
8
  curl \
9
+ wget \
10
  git \
11
+ unzip \
12
+ zip \
13
+ nano \
14
+ vim \
15
  python3 \
16
  python3-pip \
17
  python3-venv \
18
  chromium \
19
  chromium-driver \
20
+ ca-certificates \
21
+ && apt-get clean \
22
  && rm -rf /var/lib/apt/lists/*
23
 
24
+ # Install Node.js 20
25
+ RUN curl -fsSL https://deb.nodesource.com/setup_20.x | bash - && \
26
+ apt-get install -y nodejs && \
27
+ apt-get clean && \
28
+ rm -rf /var/lib/apt/lists/*
29
+
30
+ # Upgrade pip
31
+ RUN python3 -m pip install --no-cache-dir --upgrade pip setuptools wheel
32
 
33
+ # Install Python packages
34
  RUN pip3 install --no-cache-dir \
35
  selenium \
36
  webdriver-manager \
37
  fake-useragent \
38
  requests \
39
  beautifulsoup4 \
40
+ flask \
41
+ aiohttp \
42
+ lxml \
43
+ python-dotenv \
44
+ rich
45
 
46
+ # Install global npm packages
47
+ RUN npm install -g \
48
+ pnpm \
49
+ yarn \
50
+ typescript \
51
+ ts-node \
52
+ nodemon
53
 
54
+ # Environment variables for Selenium
55
  ENV CHROME_BIN=/usr/bin/chromium
56
  ENV CHROMEDRIVER=/usr/bin/chromedriver
57
 
58
+ # Disable authentication (optional)
59
+ ENV PASSWORD=""
60
+
61
+ # Workspace
62
+ RUN mkdir -p /home/coder/project && \
63
+ chown -R coder:coder /home/coder/project
64
+
65
  USER coder
66
  WORKDIR /home/coder/project
67
 
68
  EXPOSE 7680
69
 
70
+ CMD ["code-server", "--bind-addr", "0.0.0.0:7680", "--auth", "none", "/home/coder/project"]