I'm trying out the new webapp service for linux/containers with a custom docker image I've pushed up to an ACR.
https://azure.microsoft.com/en-gb/blog/webapp-for-containers-overview/
We've got it up and running, a django app, nicely.
What I need to do now though is to be able to run one off commands in the containers we're making.
Could anyone point me in the right direction on how to accomplish that?
Any help, greatly appreciated.
The current approach for doing that in App Service Linux is to enable SSH to your container - https://docs.microsoft.com/en-us/azure/app-service-web/app-service-linux-ssh-support
# ------------------------
# SSH Server support
# ------------------------
RUN apt-get update \
&& apt-get install -y --no-install-recommends openssh-server \
&& echo "root:Docker!" | chpasswd
You can then SSH into it through the Kudu console (which uses WebSSH) -
I'm pretty sure its not possible with Azure Web App yet.
Useful links:
https://docs.microsoft.com/en-us/azure/app-service-web/app-service-linux-ssh-support
https://docs.microsoft.com/en-us/azure/app-service-web/app-service-linux-using-custom-docker-image#troubleshooting
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With