Docker Community Forums

Share and learn in the Docker community.

[SOLVED] Error: No machine name(s) specified and no “default” machine exists

docker

(Dockergi) #1

I installed Docker on Windows 10 and it doesn’t work.


I installed Ubuntu on Virtualbox and then I installed Docker using this guide:

On Windows and Ubuntu I get the same error:

Error: No machine name(s) specified and no “default” machine exists

How do I solve my problem?
Thank you

My OS:
Ubuntu 18.04 on Virtualbox
My code on Ubuntu:

pippo@pippo-VirtualBox:~$ cd /home/gi/Scrivania/Docker-Ubuntu-18.04
pippo@pippo-VirtualBox:~/Scrivania/Docker-Ubuntu-18.04$ docker build -t apache_server:v1 .
unable to prepare context: unable to evaluate symlinks in Dockerfile path: lstat /home/gi/Scrivania/Docker-Ubuntu-18.04/Dockerfile: no such file or directory
pippo@pippo-VirtualBox:~/Scrivania/Docker-Ubuntu-18.04$ cd /home/gi/Scrivania/Docker-Ubuntu-18.04/01-Pagina-Statica
pippo@pippo-VirtualBox:~/Scrivania/Docker-Ubuntu-18.04/01-Pagina-Statica$ docker build -t apache_server:v1 .
Sending build context to Docker daemon  11.26kB
Step 1/4 : FROM httpd:2.4
2.4: Pulling from library/httpd
f7e2b70d04ae: Pull complete 
84006542c688: Pull complete 
dae6fe3c5e81: Pull complete 
33fc493aff90: Pull complete 
9a4113020573: Pull complete 
Digest: sha256:20ead958907f15b638177071afea60faa61d2b6747c216027b8679b5fa58794b
Status: Downloaded newer image for httpd:2.4
 ---> 2d1e5208483c
Step 2/4 : LABEL Author="Nome Cognome"
 ---> Running in 9f8bdb60a721
Removing intermediate container 9f8bdb60a721
 ---> 6c25920b8154
Step 3/4 : EXPOSE 80
 ---> Running in d34582486fc6
Removing intermediate container d34582486fc6
 ---> c9f65c4f7a2a
Step 4/4 : COPY ./htdocs/ /usr/local/apache2/htdocs/
 ---> 72cb4f1bf46d
Successfully built 72cb4f1bf46d
Successfully tagged apache_server:v1
pippo@pippo-VirtualBox:~/Scrivania/Docker-Ubuntu-18.04/01-Pagina-Statica$ docker run -d --name apache_server_container -p 8088:80 apache_server:v1
80324c8e5881d6d7051cdff7c8214f946260f6013bab61c58896af6d79d3641e
pippo@pippo-VirtualBox:~/Scrivania/Docker-Ubuntu-18.04/01-Pagina-Statica$ docker-machine ip

Comando «docker-machine» non trovato, ma può essere installato con:

sudo snap install docker

pippo@pippo-VirtualBox:~/Scrivania/Docker-Ubuntu-18.04/01-Pagina-Statica$ sudo snap install docker
[sudo] password di gi: 
docker 18.06.1-ce from Canonical✓ installed
pippo@pippo-VirtualBox:~/Scrivania/Docker-Ubuntu-18.04/01-Pagina-Statica$ docker-machine ip
Error: No machine name(s) specified and no "default" machine exists
pippo@pippo-VirtualBox:~/Scrivania/Docker-Ubuntu-18.04/01-Pagina-Statica$ ^C
pippo@pippo-VirtualBox:~/Scrivania/Docker-Ubuntu-18.04/01-Pagina-Statica$ ^C
pippo@pippo-VirtualBox:~/Scrivania/Docker-Ubuntu-18.04/01-Pagina-Statica$

[SOLVED] Why does nobody respond to my messages?
(Dockergi) #2

An alternative solution is to call up the application from this address:
http://localhost:8088/
http://0.0.0.0:8088/
It works but only the first time. If I modify the index.html file I can’t see the updates on the browser.
When I typed:
http://192.168.99.100:8088
updates were read and displayed by docker perfectly.
this is why I want to use “docker-machine ip”.


(Dockergi) #3

There is another thing that I don’t understand:

1.I modify index.html
2.I write localhost: 8088 in the browser and I don’t see changes to index.html
3.I do this:

docker stop apache_server_container
docker rm apache_server_container
docker ps -a

(all empty, ok)

docker run -d --name apache_server_container -p 8088:80 apache_server:v1

(container created, ok)
I return to the browser by typing localhost: 8088 but I don’t see changes to index.html
If I recreate the container because I don’t see the updated index.html file?
Does anyone explain the reason to me?
Thank you

My code:

cd /home/myname/Scrivania/Docker-Ubuntu-18.04/01-Pagina-Statica
docker build -t apache_server:v1 .
docker run -d --name apache_server_container -p 8088:80 apache_server:v1
docker-machine ip

Dockerfile:

FROM httpd:2.4
LABEL Author="Nome Cognome"
EXPOSE 80
COPY ./htdocs/ /usr/local/apache2/htdocs/

(Dockergi) #4

I solved it and I also realized that I was an idiot (could you say that!).
Thank you