Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions run/docker/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,16 @@ RUN python manage.py collectstatic --noinput

EXPOSE 8000

# Install dos2unix only if needed and convert line endings if necessary
RUN if file /srv/run/docker/start.sh | grep -q "CRLF"; then \
apt-get update && apt-get install -y dos2unix && \
dos2unix /srv/run/docker/start.sh && \
apt-get remove -y dos2unix && \
apt-get autoremove -y && \
apt-get clean && \
rm -rf /var/lib/apt/lists/*; \
fi

RUN chmod +x /srv/run/docker/start.sh

CMD ["/srv/run/docker/start.sh"]