Search code examples
dockerelixirumbrella

docker: invalid reference format on Elixir Umbrella project


following this tutorial I'm trying to dockerize my Elixir Umbrella project before pushing to production.

I'm trying to run my app through Docker using this command:

docker run --rm -ti \
             -p 4000:4000 \
             -e COOKIE=a_cookie \
             -e BASIC_AUTH_USERNAME=UserName \
             -e BASIC_AUTH_PASSWORD=Password \
             -e BASIC_AUTH_REALM=realm \ political_project:0.1.0

I get the following error: docker: invalid reference format. See 'docker run --help'.

As I am new to Docker, I have no clue what the problem might come from.

when I run docker images, I get:

REPOSITORY                        TAG                 IMAGE ID            CREATED             SIZE
political_project                 0.1.0               0618eaa9fcf0        8 minutes ago       54.7MB
<none>                            <none>              ce28b64790a6        8 minutes ago       370MB
bitwalker/alpine-elixir-phoenix   latest              cc054692aa5e        37 hours ago        311MB
alpine                            3.6                 43773d1dba76        12 days ago         4.03MB

Solution

  • Just remove the last blackslash right in front of the image name

    docker run --rm -ti \
                 -p 4000:4000 \
                 -e COOKIE=a_cookie \
                 -e BASIC_AUTH_USERNAME=UserName \
                 -e BASIC_AUTH_PASSWORD=Password \
                 -e BASIC_AUTH_REALM=realm political_project:0.1.0