Giter Site home page Giter Site logo

toranb / dockerfiles-for-windows Goto Github PK

View Code? Open in Web Editor NEW

This project forked from bucrogers/dockerfiles-for-windows

0.0 0.0 0.0 542 KB

Dockerfiles for SQL Server, ASP.NET 4.6 / IIS App, Docker Swarm, PostgreSQL, Python REST service et al.

License: MIT License

PowerShell 2.52% ASP 4.18% C# 5.36% CSS 0.16% HTML 1.38% JavaScript 82.76% Python 3.37% Ruby 0.02% Batchfile 0.24%

dockerfiles-for-windows's Introduction

Dockerfiles for Windows

All have been built and tested under Windows Server 2016 TP5.

  • sqlexpress: SQL Server 2014 Express
  • dotnet-aspnet46-webapp: ASP.NET 4.6 Web UI app ("bcw" Bike Commuter Weather app), running under IIS - built in the Dockerfile using msbuild
    • There is a docker-compose.yml file in dotnet-aspnet46-webapp, to run both ui and service locally - however, docker-compose network mode functionality is limited as of TP5: The app will be accessible from outside only if run via docker run, not docker-compose
  • python-rest-service: Python REST web service consumed by the "bcw" UI above (may instead be run under Linux, via Linux Dockerfile at Dockerfiles for Linux)
  • swarm-windows: Docker Swarm executable for Windows
  • postgresql: PostgreSQL 9.5
  • ruby-sinatra-helloworld: simple "hello world" ruby sinatra web app
  • jdk8: Java JDK 8

Each of the above is entirely self-contained - all you need is what's in the dockerfile folder:

  • docker build -t sqlexpress ./sqlexpress
    • docker run -d -p 1433:1433 sqlexpress
    • The sa password (specified in the Dockerfile) is: thepassword2#
  • docker build -t bcwui ./dotnet-aspnet46-webapp
    • docker run -d -e WeatherServiceUrl=http://pythonRestServiceHost.eastus.cloudapp.azure.com:5000 -p 80:80 bcwui
    • navigate to http://publichostname/rushhourweatherapp
  • docker build -t bcwservice ./python-rest-service
    • docker run -d -e WUNDERGROUND_API_KEY=YourWundergroundApiKey -p 5000:5000 bcwservice
  • docker build -t swarm ./swarm-windows
    • docker run --rm swarm create
  • docker build -t postgresql ./postgresql
    • docker run -d -p 5432:5432 postgresql
    • test using a client such as pgAdmin III, psql or the "DB Navigator" plugin for Jetbrains IDEs IntelliJ IDEA and others - login as user 'postgres', empty password
  • docker build -t ruby-sinatra-helloworld ./ruby-sinatra-helloworld
    • docker run -d -p 4567:4567 ruby-sinatra-helloworld
  • docker build -t jdk8 ./jdk8
    • (intended as a base image for app requiring jdk to build)

Azure Resource Manager Template to create Docker Windows Container Host

Below is an example of using an Azure Resource Template to install a Windows Server 2016 TP5 Docker Windows Containers host on Azure, using Azure CLI (which may be configured to run on Windows using a Cygwin terminal window as described here):

$ azure group create -n "cliEastUsRG" -l "East US"

Substitute a unique node name for the "dnsNameForPublicIP" parameter before running the following command in place of uniqueWindowsNodeName, such as "myname-win-node" (you can also substitute for the Azure123 and Azure!23 default admin username and password, respectively) - this operation can take up to 20 minutes to complete:

$ azure group deployment create cliEastUsRG win-node --template-uri https://raw.githubusercontent.com/brogersyh/Dockerfiles-for-windows/master/dotnet-aspnet46-webapp/azuredeploy.json -p '{"adminUsername": {"value": "Azure123"}, "adminPassword": {"value": "Azure!23"}, "dnsNameForPublicIP": {"value": "uniqueWindowsNodeName"}, "VMName": {"value": "win-node"},"location": {"value": "East US"}}'

Because Azure Marketplace does not currently offer a Container-ready TP5 image, you'll need to take the following additional step, which takes about 45min:

  • Remote Desktop: uniqueWindowsNodeName.eastus.cloudapp.azure.com
  • Command Prompt (Admin)
> powershell.exe -NoProfile -ExecutionPolicy Bypass \install-containerhost
> docker images
REPOSITORY                TAG                 IMAGE ID            CREATED             SIZE
windowsservercore         10.0.14300.1000     dbfee88ee9fd        5 weeks ago         9.344 GB

Credits

Other Docker Windows Containers references

dockerfiles-for-windows's People

Contributors

brwip avatar bucrogers 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.