Red5d / docker-autocompose

Generate a docker-compose yaml definition from a running container
1.77k stars 197 forks source link

Error running this from Docker #5

Closed tehniemer closed 6 years ago

tehniemer commented 6 years ago

I've created a container and try to run this but get the error

usage: autocompose.py [-h] cname
autocompose.py: error: the following arguments are required: cname

My input parameter was

docker run -v /var/run/docker.sock:/var/run/docker.sock red5d/docker-autocompose $ombi
Red5d commented 6 years ago

Are you sure the $ombi variable actually contained a text value? That looks like it should have worked.

tehniemer commented 6 years ago

'''ombi''' is the name of the container, should I use the container ID instead?

Red5d commented 6 years ago

The container name is the right one to use, but by putting that "$" in front of the name, it became an empty variable called "$ombi". Try running it like this:

docker run -v /var/run/docker.sock:/var/run/docker.sock red5d/docker-autocompose ombi
Red5d commented 6 years ago

Ah, I see where you got that "$" from the example in the Readme. I suppose that format is a bit confusing. I'll fix that.

tehniemer commented 6 years ago

Sweet, that did the trick, thanks for the help.