The relevant difference is that in Docker you can run full trust/root and do what you want. An app service running Windows or Linux directly is always a sandbox with significant restrictions (such as, no apt-get and no executables allowed). Check your code first!