Fail to update and deploy to 1.13.4 via docker

I have upgraded elixir version from 1.10.0 to 1.13.4. I tried to update docker file manually “FROM elixir:1.10.0-slim” to FROM elixir:1.13.4-slim, but I am getting below error.

Current docker file is using

FROM elixir:1.10.0-slim

Error
** (Mix) You’re trying to run :test_app on Elixir v1.10.0 but it has declared in its mix.exs file it supports only Elixir ~> 1.13.4

Please help to upgrade the docker file and fix this issue.

Look at your mix.exs file, there is a function project, that returns a keyword list, where one of the keywords is elixir, specifying the expected elixir version for the project, you need to update this.

As I have upgraded from 1.10.0 to 1.13.4, mix.exs file contains elixir: “~> 1.13.4”.
How can I change the docker version for elixir version 1.13.4 ?

Oh sorry.

Not sure, does the dockerfile contain multiple stages? Perhaps only the build stage was updated to 1.13?

Have you tried changing the FROM thing to 1.13.4?

yes, I tried to change the version to 1.13.4, but lo luck. how to change docker image in docker-compose.yml file ?

Then you might as well use the hex.pm official Doker images. They have a lot of combinations of each Erlang and Elixir version.