publicstring commited on
Commit
aecb6e8
·
verified ·
1 Parent(s): cee13f8

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +18 -14
Dockerfile CHANGED
@@ -1,22 +1,26 @@
1
- FROM oven/bun:1.3.14
2
 
3
- # Create a non-root user with
4
- RUN useradd -m -u 2000 user
5
- USER user
6
- ENV PATH="/home/user/.local/bin:$PATH"
7
 
8
- # Set working directory
9
- WORKDIR /app
10
 
11
- # COPY --chown=user bun.lockb bun.lockb
12
- COPY --chown=user package.json package.json
13
- RUN bun install
 
14
 
 
15
 
16
- # Copy the rest of the application source
17
- COPY --chown=user . /app
 
 
 
 
 
18
 
19
- # Expose the port if needed (optional, depending on the hosting environment)
20
  EXPOSE 7860
21
 
22
- CMD ["bun", "app.js"]
 
 
 
 
 
1
 
2
+ FROM codercom/code-server:latest
 
 
 
3
 
4
+ USER root
 
5
 
6
+ RUN apt-get update && apt-get install -y \
7
+ git curl wget build-essential \
8
+ nodejs npm \
9
+ && rm -rf /var/lib/apt/lists/*
10
 
11
+ WORKDIR /workspace
12
 
13
+ RUN mkdir -p /workspace /home/coder/.local/share/code-server \
14
+ && chown -R coder:coder /workspace /home/coder
15
+
16
+ USER coder
17
+
18
+ ENV PASSWORD=dev123456
19
+ ENV HOME=/home/coder
20
 
 
21
  EXPOSE 7860
22
 
23
+ CMD ["code-server", \
24
+ "--bind-addr", "0.0.0.0:7860", \
25
+
26
+ "/workspace"]