Skip to content

Instantly share code, notes, and snippets.

View harishrathi's full-sized avatar

Harish Rathi harishrathi

  • AlgoSys Tech
  • Pune
View GitHub Profile
@harishrathi
harishrathi / windows.docker-compose.yml
Created December 14, 2016 10:38
docker-compose.yml example for windows
version: '2'
networks:
default:
external:
name: nat
services:
website:
docker inspect -f '{{range .NetworkSettings.Networks}}{{.IPAddress}}{{end}}' ...
FROM microsoft/iis
RUN ["powershell.exe", "Install-WindowsFeature NET-Framework-45-ASPNET"]
RUN ["powershell.exe", "Install-WindowsFeature Web-Asp-Net45"]
ADD web-app/ c:\\web-app
EXPOSE 8081
RUN powershell New-Website -Name 'web-app' -Port 8081 -PhysicalPath 'c:\web-app' -ApplicationPool '.NET v4.5'
FROM microsoft/nanoserver
SHELL ["powershell", "-Command", "$ErrorActionPreference = 'Stop'; $ProgressPreference = 'SilentlyContinue';"]
ENV NPM_CONFIG_LOGLEVEL info
ENV NODE_VERSION 7.2.1
ENV NODE_SHA256 960ce0e9da98650c0cb86f9550d558996b2e13cff4c376991e74a852babe76ac
RUN Invoke-WebRequest $('https://nodejs.org/dist/v{0}/node-v{0}-win-x64.zip' -f $env:NODE_VERSION) -OutFile 'node.zip' -UseBasicParsing ; \
if ((Get-FileHash node.zip -Algorithm sha256).Hash -ne $env:NODE_SHA256) {exit 1} ; \
@harishrathi
harishrathi / mongo.wsnano.dockerfile
Last active December 13, 2016 11:23
docker hosting: mongo db in windows nanoserver
FROM microsoft/nanoserver
SHELL ["powershell", "-Command", "$ErrorActionPreference = 'Stop';"]
ENV MONGO_VERSION 3.0.14
ENV MONGO_DOWNLOAD_URL http://downloads.mongodb.org/win32/mongodb-win32-x86_64-2008plus-ssl-${MONGO_VERSION}-signed.msi
ENV MONGO_DOWNLOAD_SHA256 5a081722c42c79f23d9201c97500be6ddc8741b66ce707d88dad058bf84165f1
RUN Write-Host ('Downloading {0} ...' -f $env:MONGO_DOWNLOAD_URL); \
(New-Object System.Net.WebClient).DownloadFile($env:MONGO_DOWNLOAD_URL, 'mongo.msi'); \
@harishrathi
harishrathi / iis.dockerfile
Created December 13, 2016 11:17
hosting plain html website in docker
FROM microsoft/iis:latest
RUN mkdir C:\site
RUN powershell -NoProfile -Command \
Import-module IISAdministration; \
New-IISSite -Name "Site" -PhysicalPath C:\site -BindingInformation "*:8000:"
EXPOSE 8000