]> git.lizzy.rs Git - cheatdb.git/blobdiff - Dockerfile
Fix typo
[cheatdb.git] / Dockerfile
index 73b620d82b3ee79ed49672aa69281756326463a6..1843c2df537ac39b00d7fd7851fc7437d1ed9273 100644 (file)
@@ -1,17 +1,22 @@
 FROM python:3.6
 
+RUN groupadd -g 5123 cdb && \
+    useradd -r -u 5123 -g cdb cdb
+
 WORKDIR /home/cdb
 
-COPY requirements.txt requirements.txt
-RUN pip install -r ./requirements.txt
-RUN pip install gunicorn
-RUN pip install psycopg2
+RUN mkdir /var/cdb
+RUN chown -R cdb:cdb /var/cdb
 
-COPY runprodguni.sh ./
-COPY rundebug.sh ./
-RUN chmod +x runprodguni.sh
+COPY requirements.lock.txt requirements.lock.txt
+RUN pip install -r requirements.lock.txt
+RUN pip install gunicorn
 
-COPY setup.py ./setup.py
-COPY app app
+COPY utils utils
+COPY config.cfg config.cfg
 COPY migrations migrations
-COPY config.cfg ./config.cfg
+COPY app app
+
+RUN chown -R cdb:cdb /home/cdb
+
+USER cdb