Create a server to display static pages with docker, Windows Server 2016 and AWS service [not solved]

After trying dockers locally I decided to build a real server using AWS to publish a static site.
I took a VPS on AWS to the “expensive” sum of 0 euros (thanks Amazon!).
As an OS I chose Windows 2016 with containers. After updating the operating system (it took me a while because the resources are limited) I installed docker.
While I was installing the program, the executable asked me if I wanted linux containers or windows containers. I chose not to use the windows containers and not to check because I did not know the meaning of the question. Docker was born on Linux so you always need Linux, what are the Windows containers?
Now I see this error screen and besides not knowing what to do I am VERY CONFUSED.
https://prnt.sc/lt4n7h
Why do I have two versions of docker? Why do I have a client version and a server version?
In local I wrote this thing here:

Dockerfile

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

CLI code:

cd "C:\Users\Administrator\Desktop\docker"
docker build -t apache_server:v1 .
docker run -d --name apache_server_container -p 8088:80 apache_server:v1
docker-machine ip

Now on the server I would like the same type of service but I would like the content of htdocs (html file of the website) to be visible to everyone, even you.
Another thing that I do not understand is because my VPS has 2 IP (one public and one private). What is the difference?
My published site will have this link:
http://public_IP_address
or this:
http://private_IP_address
?

Thanks a lot

P.S .: Bring patience I’m not a systems engineer! :frowning:

You installed Docker for Windows (Docker Desktop) on WIndows 2016 which is not supported configuration. You need to install DockerEE for supported configuration.

1 Like

But Docker EE is not a free version!

What do you tell me about other questions?

Microsoft Windows [Version 10.0.14393]
(c) 2016 Microsoft Corporation. All rights reserved.

C:\Users\Administrator>docker version
Client: Docker Engine - Community
 Version:           18.09.0
 API version:       1.24 (downgraded from 1.39)
 Go version:        go1.10.4
 Git commit:        4d60db4
 Built:             Wed Nov  7 00:47:51 2018
 OS/Arch:           windows/amd64
 Experimental:      false

Server:
 Engine:
  Version:          1.12.2-cs2-ws-beta
  API version:      1.25 (minimum version )
  Go version:       go1.7.1
  Git commit:       050b611
  Built:            Tue Oct 11 02:35:40 2016
  OS/Arch:          windows/amd64
  Experimental:     false

C:\Users\Administrator>cd "C:\Users\Administrator\Desktop\docker"

C:\Users\Administrator\Desktop\docker>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
no supported platform found in manifest list

C:\Users\Administrator\Desktop\docker>docker run -d --name apache_server_container -p 8088:80 apache_server:v1
Unable to find image 'apache_server:v1' locally
docker: Error response from daemon: unauthorized: authentication required.
See 'docker run --help'.

C:\Users\Administrator\Desktop\docker>docker-machine ip
Error: No machine name(s) specified and no "default" machine exists

C:\Users\Administrator\Desktop\docker>

DockerEE basic is free for Windows. Look online for proper way to install it and remove Docker Desktop from server.

1 Like

I uninstalled CE docker. I tried to follow the procedure at this address:


but I get this error:

Microsoft Windows [Version 10.0.14393]
(c) 2016 Microsoft Corporation. All rights reserved.

C:\Users\Administrator>Install-Module DockerMsftProvider -Force
'Install-Module' is not recognized as an internal or external command,
operable program or batch file.

C:\Users\Administrator>Install-Package Docker -ProviderName DockerMsftProvider -Force
'Install-Package' is not recognized as an internal or external command,
operable program or batch file.

C:\Users\Administrator>

Obviously I did not go ahead.

Is not there an executable like for CE docker? Do I must use the shell?

Hello and thanks

This shall be executed from powershell prompt, you seemed to be executing it from command line.

1 Like

You are completely right!

I do not even know the difference between powershell and prompt.

Using Windows PowerShell I get this error:

Try Start-Service docker and then use docker ps to see if docker is running

1 Like

ok!

How do I know if my system has FIPS-140-2 installed?

Not sure since it’s docker forum not Windows Server forum.

1 Like

ok, in order not to make mistakes, now I enable the component. I’ll have to investigate tomorrow.

I am firm again:

PS C:\Users\Administrator> invoke-webrequest -UseBasicparsing -Outfile docker-17.06.2-ee-17.zip https://download.docker.
com/components/engine/windows-server/2.1/docker-17.06.2-ee-17.zip
invoke-webrequest :
404 Not Found
404 Not Found
Code: NoSuchKey
Message: The specified key does not exist.
Key: components/engine/windows-server/2.1/docker-17.06.2-ee-17.zip
RequestId: 3FC8A5383CDE4879
HostId: VsBenln0vXfwEy1Q7K1CqYk29VZqAeEqmLjYInCuCwhjjYe0eYSMD2woHfkfEHPNEwp87IAOciE=
An Error Occurred While Attempting to Retrieve a Custom Error Document
Code: NoSuchKey
Message: The specified key does not exist.
Key: error.html
At line:1 char:1
+ invoke-webrequest -UseBasicparsing -Outfile docker-17.06.2-ee-17.zip  ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : InvalidOperation: (System.Net.HttpWebRequest:HttpWebRequest) [Invoke-WebRequest], WebExc
   eption
    + FullyQualifiedErrorId : WebCmdletWebResponseException,Microsoft.PowerShell.Commands.InvokeWebRequestCommand
PS C:\Users\Administrator>

https://prnt.sc/lt6a8f

This is very old version of dockerEE. Get more recent version and contact docker (I believe option is available on that page) that page is outdated.

1 Like

So what should I do?
Proceed to the next step?
I type this?

Install-Package -Name docker -ProviderName DockerMsftProvider -Force -RequiredVersion 18.09

If this relevant to FIPS then I don’t know exact details. On default installation of Windows 2016 you just need to do

Install-Module DockerMsftProvider -Force
Install-Package Docker -ProviderName DockerMsftProvider -Force
1 Like

No, it doesn’t work with FIPS.
Now I also understand your suggestion.
At the bottom of the page I find your command to start docker.

The guide invites you to launch this script again:

Proceed or do I neglect?

```
$script = [ScriptBlock]::Create((docker run --rm docker/ucp-agent-win:3.0.6 windows-script | Out-String))

Invoke-Command $script
```

In any case, the installation that I have done is still to be perfected:
https://prnt.sc/lt6qmu
https://paste.ubuntu.com/p/DGQFBm4ndQ/

I installed Docker EE on Windows Server 2016 but I can not start my container described by the image of the dockerfile.
I get this error:
no matching manifest for unknown in the manifest list entries
Below you will find all the code:
https://prnt.sc/lu3ktm
https://prnt.sc/lu3l38
If you do not help me, I’m still.
For help!

Your screenshot showing you are trying to run an image which does not exists. Not sure what are you asking

1 Like

With this command I try to create an image described in the dockerfile. Look at my first post. There are all codes. I would like to know why my codes do not work.
I just want to put on a server to display static pages.

Dockerfile

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

CLI code:

cd "C:\Users\Administrator\Desktop\docker"
docker build -t apache_server:v1 .
docker run -d --name apache_server_container -p 8088:80 apache_server:v1
docker-machine ip

Dockerfile is located in:
C:\Users\Administrator\Desktop\docker

My code is perfect, on Docker CE works wonderfully, on my local PC it works wonders.
Are the Docker CE codes the same as those of Docker EE?
Can I use power shell or do I need to install “Kitematic (Alpha)” as on my desktop with windows 8.1?
To build this server I have to install other programs or just Docker?
Did you understand what I’m trying to do?
Keep in mind that I’m not a system administrator and I could leave out things you take for granted.

Docker EE on Windows server will not allow you to run UNIX containers and your container is unix.

1 Like