Hello @Mulansky, Ralf
Here is a simplified diagram of App Service on Linux (almost certain to contain some inaccuracies):
As the architecture diagram above shows, each container has its /home directory mounted from the file share. This means while the container has everything we need to run the application, the actual application itself is located outside of the container. This allows the Kudu container to also see the application folder. It also allows continuous deployment to deploy to the shared folder and the application is automatically updated without restarting the container.
https://anthonychu.ca/post/jekyll-azure-app-service-linux/
When you create a new App Service on Linux, you choose from pre-defined runtime containers - PHP8. However when you push the code to repository and it gets deployed to ASL, the PHP8 container is not going to be the container where the application gets built or custom scripts executed. It is actually going to be in the Kudu container.
Unfortunately there is no PHP in Kudu container.
As an option you may use your custom Docker image and add any startup commands you want there
FROM tiangolo/uwsgi-nginx-flask:python3.6
RUN mkdir /code
WORKDIR /code
ADD requirements.txt /code/
RUN pip install -r requirements.txt --no-cache-dir
ADD . /code/
# ssh
ENV SSH_PASSWD "root:Docker!"
RUN apt-get update \
&& apt-get install -y --no-install-recommends dialog \
&& apt-get update \
&& apt-get install -y --no-install-recommends openssh-server \
&& echo "$SSH_PASSWD" | chpasswd
COPY sshd_config /etc/ssh/
COPY init.sh /usr/local/bin/
RUN chmod u+x /usr/local/bin/init.sh
EXPOSE 8000 2222
#CMD ["python", "/code/manage.py", "runserver", "0.0.0.0:8000"]
ENTRYPOINT ["init.sh"]
ENTRYPOINT ["init.sh"]
, invokes init.sh
to start the SSH service and Python server. You can add your deployment script into init.sh
https://learn.microsoft.com/en-us/azure/app-service/tutorial-custom-container?pivots=container-linux