Fix docker build failing
This commit is contained in:
parent
4c3fced4e9
commit
4a49681127
14
Dockerfile
14
Dockerfile
|
@ -6,10 +6,13 @@ COPY ./requirements.txt /app/
|
|||
|
||||
WORKDIR /app/
|
||||
|
||||
RUN mkdir /app/static/ && \
|
||||
RUN apt-get update && apt-get install build-essential libssl-dev libffi-dev -y && \
|
||||
mkdir /app/static/ && \
|
||||
pip install -r requirements.txt && \
|
||||
pip install psycopg2 && \
|
||||
./manage.py collectstatic --no-input
|
||||
./manage.py collectstatic --no-input && \
|
||||
apt-get remove --purge -y build-essential && \
|
||||
apt-get autoremove --purge -y
|
||||
|
||||
FROM python:3.6-slim-stretch
|
||||
|
||||
|
@ -20,9 +23,12 @@ COPY --from=build /app/static /app/static/
|
|||
|
||||
WORKDIR /app/
|
||||
|
||||
RUN pip install -r requirements.txt && \
|
||||
RUN apt-get update && apt-get install build-essential libssl-dev libffi-dev -y && \
|
||||
pip install -r requirements.txt && \
|
||||
pip install psycopg2 && \
|
||||
adduser --system --home /app/ passbook && \
|
||||
chown -R passbook /app/
|
||||
chown -R passbook /app/ && \
|
||||
apt-get remove --purge -y build-essential && \
|
||||
apt-get autoremove --purge -y
|
||||
|
||||
USER passbook
|
||||
|
|
Reference in New Issue