Fix CDB running as root in docker container
This commit is contained in:
parent
913537f96f
commit
35e1aba4ad
|
@ -1,5 +1,8 @@
|
||||||
FROM python:3.6
|
FROM python:3.6
|
||||||
|
|
||||||
|
RUN groupadd -g 5123 cdb && \
|
||||||
|
useradd -r -u 5123 -g cdb cdb
|
||||||
|
|
||||||
WORKDIR /home/cdb
|
WORKDIR /home/cdb
|
||||||
|
|
||||||
COPY requirements.txt requirements.txt
|
COPY requirements.txt requirements.txt
|
||||||
|
@ -10,3 +13,7 @@ COPY utils utils
|
||||||
COPY app app
|
COPY app app
|
||||||
COPY migrations migrations
|
COPY migrations migrations
|
||||||
COPY config.cfg ./config.cfg
|
COPY config.cfg ./config.cfg
|
||||||
|
|
||||||
|
RUN chown cdb:cdb /home/cdb -R
|
||||||
|
|
||||||
|
USER cdb
|
||||||
|
|
Loading…
Reference in New Issue