Contents tagged with docker

  • How to install latest nuget in Dockerfile for windows

    Hello everybody,

    today I want to write few words about how to instal latest Nuget into Windows docker container. For this purpose you can use following commands:

    RUN mkdir c:\NugetRUN Invoke-WebRequest 'https://dist.nuget.org/win-x86-commandline/v4.1.0/nuget.exe' -OutFile 'c:\Nuget\nuget.exe'; \ $env:PATH = $env:PATH + 'c:\Nuget\;c:\Nuget'; \ Set-ItemProperty -Path 'HKLM:\SYSTEM\CurrentControlSet\Control\Session Manager\Environment\' -Name Path -Value $env:PATH more

  • How to copy Folder in Dockerfile

    Hello everybody,

    recently I had following issue:

    copy folder dotnet-dev-win-x64.1.0.1 into c:\Program Files\Dotnet in container. After different dancing and triings I've found following command that worked:

    COPY ["dotnet-dev-win-x64.1.0.1", "c:/Program Files/dotnet"] more

  • How to add to docker image dot net sdk and other useful staff

    Hello everybody,

    today I want to write few rakes of Dockerfile.

    First of all I want to document how to install dot net sdk 1.1. It isn't installable by chocolatey, so I had to use following workaround:

    RUN Invoke-WebRequest 'https://download.microsoft.com/download/1/1/4/114223DE-0AD6-4B8A-A8FB-164E5862AF6E/dotnet-dev-win-x64.1.0.3.exe' -OutFile dotnetDev.exeRUN .\dotnetDev.exe /Silent /Full

    Another issue, that I faced was installing of Git, or for containers I prefer MinGit. It can be achieved in the following way:

    RUN Invoke-WebRequest 'https://github.com/git-for-windows/git/releases/download/v2.12.2.windows.2/MinGit-2.12.2.2-64-bit.zip' -OutFile MinGit.zip

    RUN Expand-Archive c:\ … more

  • Working with Dockerfile

    Hello everybody,

    today I want to write a few words about Dockerfile. 

    So, as usually for developer it will not be enough just ordinary docker images. Quite often they need to add some more features to docker images. One of the useful ways to organize it can be creating Dockerfile. 

    Dockerfile in itself just a text file with instructions. Of course that instructions are docker specific. And it's similar to making program say in C#. While after C# program I need to execute compiler, with Dockerfile I need to execute command docker build. You can consider docker build as compiler from Docker. 

    Executed image is a container. 

    Dockerfile has build instructions. 

    Some docker instructions … more

  • How to analyze condition of your docker under windows

    Hello everybody,

    today I want to share one more piece of search, which I've found today.

    My current situation with docker is the following: it refuses to be executed.

    In order to see, why, following command can be used:

    wget https://github.com/Microsoft/Virtualization-Documentation/raw/master/windows-server-container-tools/Debug-ContainerHost/Debug-ContainerHost.ps1 -UseBasicParsin | iex

    This command gave me following output:

    Describing Windows Version and Prerequisites [+] Is Windows 10 Anniversary Update or Windows Server 2016 86ms [+] Has KB3192366, KB3194496, or later installed if running Windows build 14393 17ms [+] Is not a build with blocking issues 16ms [+] Has 'Containers' … more

  • How to manage docker from C# with SSH

    Hello everybody,

    today I want to write a few words about how to work with Docker with help of C#.

    Recently I've got a challenge to find the way how to manage Docker. Initially I've tried Docker.Dotnet library. It has quite interesting options for management of docker, but from my own prospective it's not very convenient for management.  After some trial/error efforts I've decided to try another option. I tried using SSH connection in order to manage linux instance with Docker. In order to have access to CentOs I've used SSH.Net.

    In order to have option for mocking of SSH I've created following interface:

    public interface ISshManager

    {

    string IpHost { get; set; } … more

  • How to build private docker registry

    Hello everybody,

    today I want to describe to ways of how private registry of docker can be used and created. Before I'll go in details of it's creation I want to point what is purpose of docker registry in itself. Imagine that you spent a lot of time and money in order to create your own docker image. And for some reasons you don't want to share it with whole world, just with your own customer. What you can do? You have two options:

    Use private docker registry

    Create your own docker registry

    I will omit how to use 1 for now and will go directly to point 2. 

    There are two ways how to create local docker registry:

    Direct installation

    Registry image

    Before you continue to any … more

  • Container orchestration with Kubernetes, Docker Swarm and Mesos-marathon

    Hello everybody,

    today I want to leave few notes about following video: https://www.youtube.com/watch?v=_uw1ISM_uRU which is done by Adrian Mouat.

    First of all, what is orchestration definition: "The planing  or coordination of the elements of a situation to produce a desired effect, especially surreptitiously". 

    So, what are elements in Kubernetes, Docker Swarm and Mesos maraphon?

    Containers

    Hosts

    Networking

    What are desired effects? Here they are:

    Running application

    Automatically scale

    Fault tolerant

    Node failover, node rebalancing, health checks

    Efficient use of resources

    Require little of manual intervention

    Swarm and compose

    Docker official solution

    Uses … more

  • Windows container types in docker

    Hello everybody,

    today I want to write a few words about two types of containers in windows:

    Windows server containers

    Hyper-V containers

    Windows server containers provide application isolation through process and namespace isolation. Windows server container shares a kernel with the container host and all containres running on the host.

    Hyper-V containers expand on the isolation provided by Windows server containers by running each container in a highly optimized virtual machine. In this configuration kernel of the container host is not shared with other Hyper-V containers.

    more

  • Some notes on usage of docker

    Hello everybody,

    today I want to write a few words about usage of docker for windows.

    First of all, I want to point what is docker at all. There are many ideas of how to explain it, but in my opinion docker is like installed and configured piece of software with needed fragment of operating system. It can be installed software with windows or with Linux fragment. What is also interesting is that Windows 10 with docker for windows knows how to execute Linux docker containers. So it means that from inside of windows you can have nginx Linux server.

    As you can see from my screenshot, docker for windows installed MobyLinuxVM and if there is a need to execute docker contaner for Linux, it … more