Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

docker does not like naming containers uppercase single case letters #1

Closed
zbanga opened this issue Jun 14, 2017 · 11 comments
Closed

Comments

@zbanga
Copy link

zbanga commented Jun 14, 2017

Changing to a lower-case will help

@ctubio
Copy link
Owner

ctubio commented Jun 14, 2017

umf i hate grammar (https://github.com/docker/distribution/blob/master/reference/reference.go#L1) but lets try to be correct, many thanks for the report!

@ctubio
Copy link
Owner

ctubio commented Jun 14, 2017

also, many thanks for the solution 🌻

@jaNGOB
Copy link

jaNGOB commented Jun 16, 2017

It's still not working for me. I tried to run it a few days ago and also had the Problem with the uppercase "K". I have redone the whole process but it's still throwing an error at me because of the "k".

What else could I do?

Thank you for your help.

$ docker run -p 3000:3000 --link K-mongo:mongo --name k -d k
C:\Program Files\Docker Toolbox\docker.exe: Error response from daemon: Invalid container name (k), only [a-zA-Z0-9][a-zA-Z0-9_.-] are allowed.
See 'C:\Program Files\Docker Toolbox\docker.exe run --help'.

@ctubio
Copy link
Owner

ctubio commented Jun 16, 2017

sorry for the confusion, the image name should be k, but the container name K (you have both in lowercase), thats what worked for me:

 $ cd path/to/Dockerfile
 $ docker run -p 27017:27017 --name K-mongo -d mongo
 $ docker build -t k .
 $ docker run -p 3000:3000 --link K-mongo:mongo --name K -d k

hope this works for you too, otherwise please let me know and i promise to review the whole process carefully

@jaNGOB
Copy link

jaNGOB commented Jun 16, 2017

hmm, I still can't get it to work.

Im sorry to bother you with this and thanks a lot for your help

@ctubio
Copy link
Owner

ctubio commented Jun 16, 2017

Hello,
i suspect you have an old docker version, may be?
mine is:

$ docker --version
Docker version 1.10.3, build 20f81dd

maybe if you have an uptodate version, can you try to delete all images/containers/cache and try again?
i really think you put the correct commands now, so may be something that is already in there (for me K was a valid container name 2 days ago if i dont remember wrong)

@jaNGOB
Copy link

jaNGOB commented Jun 16, 2017

I run Docker CE and use the Docker version 17.05.0-ce, build 89658be. It's the uptodate version of Docker CE as far as I know.

I've redone everything again and it still doesn't work.

@ctubio
Copy link
Owner

ctubio commented Jun 17, 2017

well, donno why your version doesn't like single-letter names, but if so try to change K and k to longer names:

 $ cd path/to/Dockerfile
 $ docker run -p 27017:27017 --name K-mongo -d mongo
 $ docker build -t kjs .
 $ docker run -p 3000:3000 --link K-mongo:mongo --name Kjs -d kjs

or something similar, cos i think your error is just with the namings of the container

if this works better for you, let me know please and i will update the docs

@jaNGOB
Copy link

jaNGOB commented Jun 18, 2017

It worked. I had no problem now with Kjs. You were right, it was only because of the naming.

Thank you again for your patience and help.

@ctubio
Copy link
Owner

ctubio commented Jun 18, 2017

thanks for the report'¡ i just updated the docs 💃

@ctubio
Copy link
Owner

ctubio commented Jun 18, 2017

btw if you use GDAX, you may be interested in the last comment at #3

@brucetus brucetus mentioned this issue May 14, 2018
ctubio pushed a commit that referenced this issue Nov 18, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants