bk939448 commited on
Commit
95d9a54
·
verified ·
1 Parent(s): 0008579

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +6 -7
Dockerfile CHANGED
@@ -27,10 +27,9 @@ RUN apt-get update && apt-get install -y \
27
  RUN curl -fsSL https://opencode.ai/install | bash
28
 
29
 
30
- # 4. Setup data folder and root permissions
31
- USER root
32
- RUN mkdir -p /data && chmod 777 /data
33
- WORKDIR /data
34
 
35
 
36
  # 5. Copy entrypoint script
@@ -39,9 +38,9 @@ RUN chmod +x /entrypoint.sh
39
 
40
 
41
  # 6. Environment settings with RAM limit
42
- ENV OPENCODE_DATA_DIR=/data
43
- ENV HOME=/data
44
- ENV PATH="/root/.local/bin:/home/node/.local/bin:$PATH"
45
  ENV NODE_OPTIONS="--max-old-space-size=14336"
46
 
47
 
 
27
  RUN curl -fsSL https://opencode.ai/install | bash
28
 
29
 
30
+ # 4. Setup user & folders
31
+ RUN useradd -m -s /bin/bash user
32
+ RUN mkdir -p /home/user && chmod 777 /home/user
 
33
 
34
 
35
  # 5. Copy entrypoint script
 
38
 
39
 
40
  # 6. Environment settings with RAM limit
41
+ ENV OPENCODE_DATA_DIR=/home/user
42
+ ENV HOME=/home/user
43
+ ENV PATH="/root/.local/bin:/home/node/.local/bin:/home/user/.local/bin:$PATH"
44
  ENV NODE_OPTIONS="--max-old-space-size=14336"
45
 
46