Previously unexplored entrypoint technology has been explored. Now we can run commands after the entrypoint completes with the magical "$@" variable.
23 lines
402 B
Docker
23 lines
402 B
Docker
FROM python:3
|
|
|
|
USER root
|
|
|
|
WORKDIR /app
|
|
COPY config config
|
|
COPY api api
|
|
COPY ui ui
|
|
COPY manage.py manage.py
|
|
COPY requirements.txt requirements.txt
|
|
RUN pip install -r requirements.txt
|
|
|
|
COPY scripts scripts
|
|
RUN chmod +x scripts/*
|
|
ENTRYPOINT ["scripts/entrypoint.sh"]
|
|
|
|
RUN useradd -ms /bin/bash django
|
|
RUN chown -R django .
|
|
USER django
|
|
RUN python manage.py collectstatic --no-input
|
|
|
|
CMD ["scripts/cmd.sh"]
|