Severian commited on
Commit
6fb5312
·
verified ·
1 Parent(s): d326c6f

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +5 -2
Dockerfile CHANGED
@@ -9,6 +9,9 @@ ENV POETRY_VERSION=1.8.4 \
9
  POETRY_CACHE_DIR=/tmp/poetry_cache \
10
  PYTHONDONTWRITEBYTECODE=1
11
 
 
 
 
12
  # Install system dependencies and set up directories
13
  RUN apt-get update && apt-get install -y \
14
  postgresql \
@@ -18,8 +21,8 @@ RUN apt-get update && apt-get install -y \
18
  && chmod 2777 /var/run/postgresql \
19
  && chmod 700 /var/lib/postgresql/data
20
 
21
- # Create directories and set permissions
22
- RUN mkdir -p /app/api /app/web /data/storage /var/lib/postgresql/data && \
23
  chown -R user:user /app /data && \
24
  chmod 777 /data /app && \
25
  chown -R postgres:postgres /var/lib/postgresql/data && \
 
9
  POETRY_CACHE_DIR=/tmp/poetry_cache \
10
  PYTHONDONTWRITEBYTECODE=1
11
 
12
+ # Create users first
13
+ RUN useradd -m -u 1000 user
14
+
15
  # Install system dependencies and set up directories
16
  RUN apt-get update && apt-get install -y \
17
  postgresql \
 
21
  && chmod 2777 /var/run/postgresql \
22
  && chmod 700 /var/lib/postgresql/data
23
 
24
+ # Create application directories
25
+ RUN mkdir -p /app/api /app/web /data/storage && \
26
  chown -R user:user /app /data && \
27
  chmod 777 /data /app && \
28
  chown -R postgres:postgres /var/lib/postgresql/data && \