I'd like to attach to the container and step through the code.
Can I do this with a 'Compose Up' from 'docker-compose.debug' ?
Does this start the 'func: host start' - required for the functions runtime?
Please review my docker-compose.debug below.
Thank you.
docker-compose.debug.yaml as follows:
version: '3.4'
services:
nfunc:
image: nfunc
build:
context: .
dockerfile: ./Dockerfile
command: ["sh", "-c", "pip install debugpy -t /tmp && python /tmp/debugpy --wait-for-client --listen 0.0.0.0:5678 mytrigger\__init__.py "]
ports:
- 5678:5678
Debugging works but not with the container, which should output a simple log message every minute.
question from:
https://stackoverflow.com/questions/65922974/debugging-an-azure-function-running-in-a-docker-container 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…