NitinBot002 commited on
Commit
7c0eb83
·
verified ·
1 Parent(s): e6d42f7

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +17 -12
Dockerfile CHANGED
@@ -1,21 +1,26 @@
1
- FROM python:3.10-slim
2
 
3
- # Coder server needs Docker CLI to launch workspaces
4
- RUN apt-get update \
5
- && apt-get install -y curl docker.io ca-certificates \
6
  && rm -rf /var/lib/apt/lists/*
7
 
8
- # Add a non-root user matching Coder docs
9
- RUN useradd -m -u 1000 coder
10
  USER coder
11
- ENV HOME=/home/coder PATH=/home/coder/.local/bin:$PATH
12
  WORKDIR /home/coder
13
 
14
- # Install Coder CLI
15
- RUN curl -fsSL https://coder.com/install.sh | sh
 
 
 
16
 
17
- # Expose Coder server default port
18
- EXPOSE 3000
19
 
20
- # Launch the Coder server
 
 
 
21
  CMD ["coder", "server", "--host", "0.0.0.0", "--port", "7860"]
 
1
+ FROM debian:bullseye-slim
2
 
3
+ # Install dependencies
4
+ RUN apt-get update && apt-get install -y \
5
+ curl ca-certificates tar gzip libseccomp2 libssl1.1 git \
6
  && rm -rf /var/lib/apt/lists/*
7
 
8
+ # Create non-root user
9
+ RUN useradd -ms /bin/bash coder
10
  USER coder
11
+ ENV HOME=/home/coder
12
  WORKDIR /home/coder
13
 
14
+ # Download and extract Coder binary (manually, no dpkg)
15
+ ENV CODER_VERSION=2.23.1
16
+ RUN curl -L "https://github.com/coder/coder/releases/download/v${CODER_VERSION}/coder_${CODER_VERSION}_linux_amd64.tar.gz" | tar -xz \
17
+ && mv coder /home/coder/.local/bin \
18
+ && chmod +x /home/coder/.local/bin/coder
19
 
20
+ ENV PATH="/home/coder/.local/bin:$PATH"
 
21
 
22
+ # Expose Coder server port
23
+ EXPOSE 7860
24
+
25
+ # Start Coder server
26
  CMD ["coder", "server", "--host", "0.0.0.0", "--port", "7860"]