I am new to container, below questions might sound stupid.
There are two questions actually.
I have a non-web python application fully tested in VScode without any error, then I use below Dockerfile to build it locally.
FROM python:3.8-slim WORKDIR /app COPY requirements.txt ./ RUN pip install --no-cache-dir -r requirements.txt COPY . . CMD ["python", "./mycode.py"]
An image was built successfully, but running ended with a TypeError. I have made sure the requirements.txt has same dependency as in my project environment. The error message is "wrong tuple index" which gives me no clue on where the problem could come from a fully tested code. I am stuck here with a weird feeling.
- I then tried buildpack with Procfile:
worker: python mycode.py
An image was built successfully, but docker run could not launch the application with below error. I have no idea about what else beside "worker:" could launch a non-web python application in Procfile. Stuck again!
ERROR: failed to launch: determine start command: when there is no default process a command is required
I searched but all are about web application with "web:" in Procfile. Any help on either question will be appreciated.