[App Server] Odd behaviour with docker-compose

Whilst using the anvil-app-server within docker-compose, I’ve seen some odd behaviour…

If I run my docker container using the command from the instructions at dockerhub:

docker run -v $PWD/MyApp:/apps/MainApp -p 3030:3030 anvilworks/anvil-app-server

everything works fine. However, if I specify the same volume in a docker-compose file and try to start the container with:

docker-compose up

the app server complains that it can’t find an app.

Eventually, I solved this by downloading the Dockerfile, removing the ENTRYPOINT and CMD lines and placing exactly the same command within the docker-compose file.

It seems that when using docker-compose, the entrypoint is executed before the volume is mounted, but I can’t find anything to suggest that’s how it ought to behave.

Hi @owen.campbell,

Would you mind sharing the docker-compose.yml? I can make it work with docker run but struggle with the docker-compose.

Thanks so much.