简体   繁体   中英

How to include startup script in docker compose when deploying to Azure App

In my docker-compose.yml, I include some start up scripts for mongodb as follows:

volumes:
 - db-data:/data/db
 - ./mongo-entrypoint:/docker-entrypoint-initdb.d

How can I achieve the same thing on azure app service? Thanks!

For your issue, I recommend you use the Azure CLI command to achieve it. See the CLI command az webapp create with the parameter --startup-file , the thing you need to take care is that it is just useful for Linux.

Another way for you is that copy the startup file inside the image and set it to run with CMD inside the Dockerfile.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM