Please remove duplicate CMD directives from Python/AppDev/Dockerfile
CMD ["ufw allow 5000"] .. this is just ignored, only last CMD is executed.
Why would you try to execute ufw inside a container? It's not available.
BTW directive MAINTAINER is depreciated.