Hi,
I am having some trouble running a phoenix app in a docker container when using a sqlite database.
I have tried generating a brand new app with
mix phx.new --database sqlite3 phoenix_docker_test
generated a dockerfile with
mix phx.gen.release --docker
build the image with
docker build . -t phoenix_docker_test
created an empty database file and tried starting a container with
docker run -it --rm -e DATABASE_PATH=/srv/data.db -e SECRET_KEY_BASE=KEY_GENERATED_WITH_PHX.GEN.SECRET -p 4000:4000 -v (pwd)/data.db:/srv/data.db phoenix_docker_test
Sometimes the container just stops without output and sometimes I get
Fatal error in erl_drv_mutex_destroy(): Invalid argument [22]
I then tried creating a new project with
mix phx.new --no-ecto phoenix_docker_test
and did the same steps as before. This works just fine.
Anybody got any ideas?
Thanks!