eienmojiki commited on
Commit
39708a8
1 Parent(s): 68b8607

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +14 -3
Dockerfile CHANGED
@@ -1,10 +1,21 @@
1
  FROM postgres:latest
2
 
3
- RUN mkdir -p /.postgresql/data && \
4
- chown -R postgres: /.postgresql/data
5
 
6
  ENV POSTGRES_PASSWORD=kogakisaki \
7
- PGDATA=/.postgresql/data
 
 
 
 
 
 
 
 
 
 
 
 
8
 
9
  EXPOSE 5432
10
 
 
1
  FROM postgres:latest
2
 
3
+ RUN useradd -m -u 1000 user
 
4
 
5
  ENV POSTGRES_PASSWORD=kogakisaki \
6
+ POSTGRES_USER=user \
7
+ PGDATA=/.postgresql/data \
8
+ HOME=/home/user \
9
+ PATH=/home/user/.local/bin:$PATH
10
+
11
+ WORKDIR $HOME/app
12
+
13
+ RUN mkdir -p ./.postgresql/data && \
14
+ chown -R user: ./.postgresql/data
15
+
16
+ COPY --chown=user . $HOME/app
17
+
18
+ USER user
19
 
20
  EXPOSE 5432
21