Skip to content

Commit

Permalink
Update Dockerfile, Use dos2unix to convert the format of entrypoint.s…
Browse files Browse the repository at this point in the history
…h and solve the issue of "no such file or directory" when building the image on Windows.
  • Loading branch information
WongSaang committed Mar 8, 2023
1 parent 13f166e commit b9ff0c0
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
FROM python:3.10-slim as wsgi-server

RUN apt update \
&& apt install -y --no-install-recommends python3-dev default-libmysqlclient-dev build-essential libpq-dev \
&& apt install -y --no-install-recommends python3-dev default-libmysqlclient-dev build-essential libpq-dev dos2unix \
&& rm -rf /var/lib/apt/lists/*

ENV DJANGO_SUPERUSER_USERNAME=admin
Expand All @@ -18,6 +18,7 @@ COPY . .

RUN python manage.py check --deploy \
&& python manage.py collectstatic --no-input \
&& dos2unix entrypoint.sh \
&& chmod +x entrypoint.sh

ENTRYPOINT ["./entrypoint.sh"]
Expand Down

0 comments on commit b9ff0c0

Please sign in to comment.