GithubHelp home page GithubHelp logo

dockeronwindowsserver's Introduction

Run docker on Windows Server 2019

We are going to see how to install docker on Windows Server 2019, not Docker Desktop.

Table of Contents

General Information

  • We are going to see how to install docker engine on Windows Server 2019, not Docker Desktop.
  • Sometimes we don't want to install Docker Desktop but work directly on the server through rdp session.
  • I made this tutorial thinking about the container environment for Windows platform developers.

Technologies Used

  • Windows Server 2019, preferably ver 1809
  • Remote Desktop client

Setup

The only prerequisite is to have windows server installed. It can be in an on-premise virtual machine, physical server implementation or an instance running in Azure.

Usage

Run powershell as administrator or a user with perms.

*Install the Docker-Microsoft PackageManagement Provider from the PowerShell Gallery:
Install-Module -Name DockerMsftProvider -Repository PSGallery -Force

Agree using “Yes” or “Y” or “A” to Agree to all.

*Install the latest Docker Engine and Client
Install-Package -Name docker -ProviderName DockerMsftProvider

Check docker version:
docker -v

Install Docker Compose CLI plugin, first we must enable TLS1.2. Run the following:
[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12

Download the latest release of compose v2.7.0:
Invoke-WebRequest "https://github.com/docker/compose/releases/download/v2.7.0/docker-compose-Windows-x86_64.exe" -UseBasicParsing -OutFile $Env:ProgramFiles\Docker\docker-compose.exe

Start docker service
Start-Service Docker


It doesn't hurt to do:

Disable windows defender: Uninstall-WindowsFeature -Name Windows-Defender

Install choco package distribution:
Set-ExecutionPolicy Bypass -Scope Process -Force; [System.Net.ServicePointManager]::SecurityProtocol = [System.Net.ServicePointManager]::SecurityProtocol -bor 3072; iex ((New-Object System.Net.WebClient).DownloadString('https://community.chocolatey.org/install.ps1'))

Install notepad++: choco install notepadplusplus

Install firefox: choco install firefox


Repo IIS docker

Publish sample static page. Create folder with content folder inside

Put your website in content folder:
Screenshot

In addition to the site content you need the Dockerfile
Screenshot

Build your iis-site
docker build -t iis-site .

Run container, please red this before: https://phoenixnap.com/kb/docker-run-command-with-examples
docker run -d -p 8050:80 --name sitio-iis iis-site

Screenshot

In browser:
Screenshot

Where are Docker Images Stored? Docker Container Paths Explained

With docker info command shows docker configuration
Screenshot

dockeronwindowsserver's People

Contributors

marcosgus avatar

Stargazers

 avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.