jonatanklosko commited on
Commit
5eee37c
1 Parent(s): 26632aa

Switch to a non-root user to avoid permission issues at runtime

Browse files
Files changed (1) hide show
  1. Dockerfile +9 -2
Dockerfile CHANGED
@@ -10,8 +10,15 @@ ENV LIVEBOOK_DATA_PATH "/data"
10
  ENV LIVEBOOK_PORT 7860
11
 
12
  EXPOSE 7860
13
- USER root
14
- COPY public-apps/ /public-apps
15
  RUN mkdir -p /data
16
  RUN chmod 777 /data
 
 
 
 
 
 
 
 
17
  RUN /app/bin/warmup_apps
 
10
  ENV LIVEBOOK_PORT 7860
11
 
12
  EXPOSE 7860
13
+
 
14
  RUN mkdir -p /data
15
  RUN chmod 777 /data
16
+
17
+ # The Space container runs with user ID 1000
18
+ RUN useradd -m -u 1000 user
19
+ ENV HOME=/home/user
20
+
21
+ USER user
22
+
23
+ COPY --chown=user public-apps/ /public-apps
24
  RUN /app/bin/warmup_apps