ar08 commited on
Commit
cb85a12
·
verified ·
1 Parent(s): 67da0ba

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +14 -8
Dockerfile CHANGED
@@ -4,25 +4,31 @@ FROM ubuntu:latest
4
  # Set environment variables
5
  ENV DEBIAN_FRONTEND=noninteractive
6
 
7
- # Install necessary packages
8
- RUN apt-get update && \
9
- apt-get install -y curl sudo
10
- # Set environment variables
11
- ENV DEBIAN_FRONTEND=noninteractive
12
-
13
  # Install necessary packages
14
  RUN apt-get update && \
15
  apt-get install -y \
16
  curl \
17
  sudo \
18
  build-essential \
19
- python3 \
 
 
 
 
 
 
 
 
20
  python3-pip \
21
  default-jdk \
22
  default-jre \
23
  g++ \
24
  gcc
25
 
 
 
 
 
26
  # Install code-server
27
  RUN curl -fsSL https://code-server.dev/install.sh | sh
28
 
@@ -37,6 +43,6 @@ USER coder
37
  EXPOSE 8080
38
 
39
  # Start code-server
40
- CMD ["code-server", "--bind-addr", "0.0.0.0:7860", "--auth", "none"]
41
 
42
  # End of Dockerfile
 
4
  # Set environment variables
5
  ENV DEBIAN_FRONTEND=noninteractive
6
 
 
 
 
 
 
 
7
  # Install necessary packages
8
  RUN apt-get update && \
9
  apt-get install -y \
10
  curl \
11
  sudo \
12
  build-essential \
13
+ software-properties-common
14
+
15
+ # Add deadsnakes PPA to install Python 3.9
16
+ RUN add-apt-repository ppa:deadsnakes/ppa && \
17
+ apt-get update && \
18
+ apt-get install -y \
19
+ python3.9 \
20
+ python3.9-venv \
21
+ python3.9-dev \
22
  python3-pip \
23
  default-jdk \
24
  default-jre \
25
  g++ \
26
  gcc
27
 
28
+ # Update alternatives to use python3.9 as default
29
+ RUN update-alternatives --install /usr/bin/python3 python3 /usr/bin/python3.9 1 && \
30
+ update-alternatives --install /usr/bin/python python /usr/bin/python3.9 1
31
+
32
  # Install code-server
33
  RUN curl -fsSL https://code-server.dev/install.sh | sh
34
 
 
43
  EXPOSE 8080
44
 
45
  # Start code-server
46
+ CMD ["code-server", "--bind-addr", "0.0.0.0:8080", "--auth", "none"]
47
 
48
  # End of Dockerfile