What a joy it is, that now I might be able to manage Windows with the same grace and efficiency as Linux all of the sudden?
So here are my initial thoughts, and reactions.
First, there appears to be no support for cross-platform containers as of yet, so Windows containers need to run on WS2016WC or WS2016Nano with Containers support installed via PowerShell.
Very easy to get started once Docker is installed:
docker run microsoft/sample-dotnet..which produces the following cute ASCIIArt:
Welcome to .NET Core! __________________ \ \ .... ....' .... .......... .............'..'.. ................'..'..... .......'..........'..'..'.... ........'..........'..'..'..... .'....'..'..........'..'.......'. .'..................'... ...... . ......'......... ..... . ...... .. . .. ...... .... . ....... ...... ....... ............ ................ ...................... ........................'................ ......................'..'...... ....... .........................'..'..... ....... ........ ..'.............'..'.... .......... ..'..'... ...............'....... .......... ...'...... ...... .......... ...... ....... ........... ....... ........ ...... ....... '...'.'. '.'.'.' .... ....... .....'.. ..'..... .. .......... ..'........ ............ .............. ............. '.............. ...........'.. .'.'............ ............... .'.'............. .............'.. ..'..'........... ............... .'.............. ......... .............. .....
Pretty neat.
As cool as that is, I have specific application scopes I'd like to isolate, which is what Docker is really good for; separation of concerns, and codifying infrastructure as code.
So I create a nice simple Dockerfile that looks like this:
FROM microsoft/windowsservercoreAt this point, we can create a new image from this Dockerfile with:
ARG PATH
# Lets install Python 2.7
RUN powershell (new-object System.Net.WebClient).Downloadfile('https://www.python.org/ftp/python/2.7.12/python-2.7.12.msi', 'c:\python-2.7.12.msi')
RUN msiexec /qn /i C:\python-2.7.12.msi
RUN del C:\python-2.7.12.msi
ENV Path C:\Python27;C:\Python27\Scripts;$PATH
ENV PYTHONPATH C:\Python27
ENV PYTHONIOENCODING utf-8
RUN assoc .py=Python.File
RUN ftype Python.File=C:\Python27\python.exe "%1" %*
docker build --build-arg PATH=$env:Path -t my_image .And run it:
docker run -it my_image powershellMore to come as I go, have a great day.
PS C:\
No comments:
Post a Comment