Phil Davidson
asked on
Docker on Ubuntu isn't working
When I try to run Docker, I get a problem. The message is right: a URL is broken. I know that ubuntu.com is not completely down. I tested it. But the URLs in the error log don't work (like the error says). How do I get Docker to use correct working URLs? What are the working URLs?
Here is what I try to run:
Here is what I get:
Here is what I try to run:
docker build -t some-content-nginx .
Here is what I get:
Get:22 http://archive.ubuntu.com trusty-security/universe amd64 Packages [130 kB]
Err http://archive.ubuntu.com raring/main amd64 Packages
404 Not Found [IP: 91.189.92.200 80]
Err http://archive.ubuntu.com raring/universe amd64 Packages
404 Not Found [IP: 91.189.92.200 80]
Fetched 20.8 MB in 14s (1403 kB/s)
W: Failed to fetch http://archive.ubuntu.com/ubuntu/dists/raring/main/binary-amd64/Packages 404 Not Found [IP: 91.189.92.200 80]
W: Failed to fetch http://archive.ubuntu.com/ubuntu/dists/raring/universe/binary-amd64/Packages 404 Not Found [IP: 91.189.92.200 80]
E: Some index files failed to download. They have been ignored, or old ones used instead.
INFO[0015] The command [/bin/sh -c apt-get update] returned a non-zero code: 100
ASKER
My situation is a little complicated. I didn't get real closure to my port issue.
I have separate servers with Ubuntu. I cannot get the containers to run Nginx. I have different efforts on different servers.
I ran sudo docker run hello-world:
Is Docker working?
I have separate servers with Ubuntu. I cannot get the containers to run Nginx. I have different efforts on different servers.
I ran sudo docker run hello-world:
Hello from Docker.
This message shows that your installation appears to be working correctly.
Is Docker working?
Docker seems to be working, can you list and attach to containers? That would be the next step.
Docker ps -a
Docker attach <container id>
When attached to a container install things, disconnect and commit the changes.
Crtl-p + Ctrl-q
Docker commit <container id> name-of-commit
Does this all work? If yes but you're still seeing issues check the logs for the Docker container
Docker logs <container id>
Docker ps -a
Docker attach <container id>
When attached to a container install things, disconnect and commit the changes.
Crtl-p + Ctrl-q
Docker commit <container id> name-of-commit
Does this all work? If yes but you're still seeing issues check the logs for the Docker container
Docker logs <container id>
By the way, the docker build option is used when you want to build something from a source, for example from a Git repository, which would be your url. You can also use a dockerfile for that...
So the errors you see are normal, if I understand your post correctly you tried to build from "." So it tries the Ubuntu urls... At least that's what I make of it could be wrong :-)
So the errors you see are normal, if I understand your post correctly you tried to build from "." So it tries the Ubuntu urls... At least that's what I make of it could be wrong :-)
ASKER
I cannot attach to any containers. I get an error message about them not running.
I I try to use this (with no "."), I get an error:
This is the error that I get:
I I try to use this (with no "."), I get an error:
docker build -t
This is the error that I get:
docker: "build" requires 1 argument. See 'docker build --help'.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
I want to close out this question. I'll work off the other one.
ASKER
Couldn't get a great solution. I don't know if one is possible.
This is a separate issue where you can't run Ubuntu update inside a container or?
Does Docker even work? Did you test with: "sudo docker run hello-world" it should run a test-image...