Test docker on Windows 8.1


giacoccalo

Recommended Posts

Test docker on Windows 8.1

I'm studying docker and I'm a beginner.
I can not configure httpd on my operating system.
For my exercise I have to use the dockerfile.
I would like to place the html files inside this folder:
C : \ Users \ MyName \ Desktop \ docker \ htdocs
My dockerfile is present in this folder:
C : \ Users \ MyName \ Desktop \ docker \ apache_server
The code I use is this:

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

Why do I get this error?

Windows PowerShell
Copyright (C) 2014 Microsoft Corporation. Tutti i diritti sono riservati.

PS C:\Program Files\Docker Toolbox> cd C:\Users\MyName\Desktop\docker
PS C:\Users\MyName\Desktop\docker> docker build -t apache_server:v1 .
unable to prepare context: unable to evaluate symlinks in Dockerfile path: GetFileAttributesEx C:\Users\Si\Desktop\docke
r\Dockerfile: The system cannot find the file specified.
PS C:\Users\MyName\Desktop\docker> docker run -d --name apache_server -P apache_server
Unable to find image 'apache_server:latest' locally
C:\Program Files\Docker Toolbox\docker.exe: Error response from daemon: pull access denied for apache_server, repository
 does not exist or may require 'docker login'.
See 'C:\Program Files\Docker Toolbox\docker.exe run --help'.
PS C:\Users\MyName\Desktop\docker> docker-machine ip
192.168.99.100
PS C:\Users\MyName\Desktop\docker>

 

Edited by giacoccalo
Link to comment

I already wrote a post on the forum of docker and I received a very kind reply but now my account is no longer usable. I read "Account temporarily on hold" but I do not understand why. I have not written messages that go against the rules, I have not received reproaches for what I wrote and I clicked on the activation email.

If I put the docker folder in C I get this:

Windows PowerShell
Copyright (C) 2014 Microsoft Corporation. Tutti i diritti sono riservati.

PS C:\Program Files\Docker Toolbox> cd..
PS C:\Program Files> cd
PS C:\Program Files> cd..
PS C:\> cd docker
PS C:\docker> docker build -t apache_server:v1 .
unable to prepare context: unable to evaluate symlinks in Dockerfile path: GetFileAttributesEx C:\docker\Dockerfile: The
 system cannot find the file specified.
PS C:\docker>

I'm afraid I wrote the wrong URLs. Do you confirm that URLs of the dockerfile and the commands I write in the CLI shel are correct?

Thanks for all

 

 

 

 

Link to comment

The dockerfile has started and now works. I had a problem with the PC.
But now I have this problem:

Successfully tagged apache_server:v1
SECURITY WARNING: You are building a Docker image from Windows against a non-Windows Docker host. All files and director
ies added to build context will have '-rwxr-xr-x' permissions. It is recommended to double check and reset permissions f
or sensitive files and directories.
PS C:\Users\MyName\Desktop\docker> docker run -d --name apache_server -P apache_server
Unable to find image 'apache_server:latest' locally
C:\Program Files\Docker Toolbox\docker.exe: Error response from daemon: pull access denied for apache_server, repository
 does not exist or may require 'docker login'.
See 'C:\Program Files\Docker Toolbox\docker.exe run --help'.
PS C:\Users\MyName\Desktop\docker>

 

 

Link to comment

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.