Describe here your issue
I cannot deploy. I get this error: ERROR: failed to launch: determine start command: when there is no default process a command is required Dockerfile content (if any)
FROM python:3.8.0-alpine
WORKDIR /usr/src/app
ENV PYTHONDONTWRITEBYTECODE 1
ENV PYTHONUNBUFFERED 1
RUN apk update && apk add postgresql-dev gcc python3-dev musl-dev
RUN pip install --upgrade pip
COPY ./requirements.txt /usr/src/app/requirements.txt
RUN pip install -r requirements.txt
COPY accounts /usr/src/app/
COPY api /usr/src/app/
COPY app /usr/src/app/
COPY core /usr/src/app/
COPY static /usr/src/app/
COPY templates /usr/src/app/
COPY ./manage.py /usr/src/app/manage.py
COPY entrypoint.sh /usr/src/app
EXPOSE 8000
ENTRYPOINT ["./entrypoint.sh"]
`specify here your dockerfile content`
It’s a good question, ENTRYPOINT and CMD are not mutually exclusive. It’s even the opposite, most of the time you will use both at the same time. I recommend you to read this article I’ve written explaining a few concepts around Docker.
CMD and ENTRYPOINT are two instructions used to define the process that’s run in your container. ENTRYPOINT sets the process that’s executed when the container first starts. This defaults to a shell, /bin/sh. CMD provides the default arguments for the ENTRYPOINT process.
You can’t run RUN and CMD command together.
I would suggest to put python manage.py migrate into an entrypoint script like entrypoint.sh and put this into your Dockerfile