NitinBot002 commited on
Commit
c30bceb
·
verified ·
1 Parent(s): 2d3de13

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +31 -15
Dockerfile CHANGED
@@ -1,32 +1,46 @@
1
  FROM codercom/code-server:latest
2
 
3
  USER root
4
- RUN apt-get update && \
5
- apt-get install -y curl gnupg lsb-release software-properties-common
6
- RUN echo "deb http://archive.ubuntu.com/ubuntu jammy main universe" \
7
- > /etc/apt/sources.list.d/jammy.list
8
  RUN apt-get update && \
9
  apt-get install -y \
10
- python3.10 python3.10-venv python3.10-dev python3-pip \
11
- build-essential git wget unzip nano zip ca-certificates \
12
- net-tools xz-utils openssh-client && \
13
- update-alternatives --install /usr/bin/python3 python3 /usr/bin/python3.10 1 && \
14
- ln -sf /usr/bin/python3.10 /usr/bin/python && \
15
- curl -fsSL https://deb.nodesource.com/setup_18.x | bash - && \
16
- apt-get install -y nodejs && \
17
- npm install -g npm yarn && \
18
- apt-get clean && rm -rf /var/lib/apt/lists/*
 
 
 
 
 
 
 
 
 
 
 
19
 
 
20
  RUN pip3 install --no-cache-dir --upgrade pip setuptools wheel \
21
- && pip3 install --no-cache-dir ipython virtualenv jupyter
22
 
 
23
  RUN mkdir -p /home/coder/project && chown -R coder:coder /home/coder/project
 
24
  USER coder
25
 
 
26
  ENV PASSWORD=hfspacespassword \
27
  PORT=7860 \
28
  HOME=/home/coder
29
 
 
30
  RUN mkdir -p ~/.config/code-server && \
31
  echo '{ \
32
  "bind-addr": "0.0.0.0:7860", \
@@ -36,5 +50,7 @@ RUN mkdir -p ~/.config/code-server && \
36
  }' > ~/.config/code-server/config.json
37
 
38
  WORKDIR /home/coder/project
 
39
  EXPOSE 7860
40
- CMD ["code-server","--port","7860","/home/coder/project"]
 
 
1
  FROM codercom/code-server:latest
2
 
3
  USER root
4
+
5
+ # Install Python dev tools, Node.js, and useful CLI packages
 
 
6
  RUN apt-get update && \
7
  apt-get install -y \
8
+ python3-pip \
9
+ python3-venv \
10
+ python3-dev \
11
+ build-essential \
12
+ git \
13
+ curl \
14
+ wget \
15
+ unzip \
16
+ nano \
17
+ zip \
18
+ ca-certificates \
19
+ net-tools \
20
+ xz-utils \
21
+ openssh-client \
22
+ lsb-release \
23
+ software-properties-common \
24
+ && curl -fsSL https://deb.nodesource.com/setup_18.x | bash - \
25
+ && apt-get install -y nodejs \
26
+ && npm install -g npm yarn \
27
+ && apt-get clean && rm -rf /var/lib/apt/lists/*
28
 
29
+ # Upgrade pip and install Python packages
30
  RUN pip3 install --no-cache-dir --upgrade pip setuptools wheel \
31
+ && pip3 install ipython virtualenv jupyter
32
 
33
+ # Create coder user project directory
34
  RUN mkdir -p /home/coder/project && chown -R coder:coder /home/coder/project
35
+
36
  USER coder
37
 
38
+ # Set environment variables
39
  ENV PASSWORD=hfspacespassword \
40
  PORT=7860 \
41
  HOME=/home/coder
42
 
43
+ # Configure code-server
44
  RUN mkdir -p ~/.config/code-server && \
45
  echo '{ \
46
  "bind-addr": "0.0.0.0:7860", \
 
50
  }' > ~/.config/code-server/config.json
51
 
52
  WORKDIR /home/coder/project
53
+
54
  EXPOSE 7860
55
+
56
+ CMD ["code-server", "--port", "7860", "/home/coder/project"]