Build and run vernemq docker container

921 views Asked by At

Vernemq offers a pre-built image at https://hub.docker.com/r/vernemq/vernemq/. However to use the image commercially we need to buy a license. The other option, as mentioned on the website, is:

"To avoid a subscription, you need to clone this repository and build and host your own Dockerfiles/-images"

They are referring to the repository at https://github.com/vernemq/docker-vernemq.

So, to build and host the dockerfile/image we are using the commands:

  1. docker build -t docker-vernemq .
  2. docker run docker-vernemq

This gives the following error:

/usr/bin/env: 'bash\r': No such file or directory

The command that they provide is:

docker run -p 1883:1883 -e "DOCKER_VERNEMQ_ACCEPT_EULA=yes" --name vernemq1 -d vernemq/vernemq

This works. How do you build+run your own docker container instead of running a pre-built docker container?

1

There are 1 answers

0
AGIcreator On

The problem is that in Windows git is configured to convert line endings from the characters LF (line feed) used in Linux and family to CR LF (the "carriage return" character followed by "line feed") commonly used in Windows.

The solution is to use the following parameter when cloning on windows:

git clone <git-repo-link> --config core.autocrlf=input