Javier Caceres – jacace

Javier's blog about C#, Software Architecture and Design

Tools and resources for Docker

Following my presentation on the Docker Global Mentor Week 2016 – Dublin, I wanted to summarize the tools I’ve tested and the resources that I’ve created in the Docker and ASP.Net Core space as follows:

Client side Docker/Openshift plug-ins / tools:

  1. Docker Tools 2.1 For Eclipse Neon 4.6.1
  2. Docker Tools 1.0 For Eclipse Mars 4.5
  3. Docker Integration 2.5 For IntelliJ IDEA
  4. Openshift plug-in for Eclipse
  5. Docker Toolbox For Windows & Mac (not longer recommended, only if you have a machine running versions of Windows prior to Win10)
  6. Docker Tools For Visual Studio
  7. Tools to lint Dockerfiles

Server side Docker/Openshift plug-ins / tools:

  1. Jenkins Plugins for Docker
  2. Jenkins plugins for Openshift
  3. Docker Tools for TFS
  4. Openshift Extensions for Visual Studio and TFS


  1. Building Web Apps with ASP.Net Core, MVC6 and Azure App Services (also in Spanish here)
  2. Running ASP.NET Core apps in Docker -English content coming soon- (also in Spanish here)
  3. Debugging Containers and running clusters in Azure Container Services
  4. Developing Web apps in the .Net Core for Docker -post comming soon-


Thanks for reading,

Javier Andrés Cáceres Alvis

Microsoft Most Valuable Professional – MVP

Intel Black Belt Software Developer


Visual Studio Tools for Docker Part I

[ 28-Nov-2016: at the time of writing of this blog entry, there are few Docker tools for Visual Studio including “Dockerfile Language Service (Preview)” which simply does syntax highlighting and it is not described here ]

This blog entry collects my experience using the Docker extension for Visual Studio which makes the deployment of .Net Core Apps to Docker easier. I have installed the following pre-requisites to perform this review:
1.Microsoft Visual Studio 2015 Update 3
2.Microsoft .NET Core 1.0.1 RTM VS 2015 Tooling Preview 2
3.Docker For Windows 1.12.3-beta30
4.Visual Studio Tools for Docker Preview 0.41.0

Note that Docker For Windows does not use the docker-machine (which in turn used Oracle Virtual Box) but hyper-v. “Docker For Windows” is the recommended tool to run Docker natively in Windows 10. For previous versions, use the Docker Toolbox. By native, I mean that you can run Windows Server Containers (which achieve isolation through namespace and process isolation) or Hyper-V Containers (which encapsulates each container in a light weight VM) and access them via docker commands in PowerShell:


Docker for Windows also allows you to change the amount of CPU and RAM assigned to the Docker engine and sharing drives as seen in the images below. Note: sharing drives is not a specific feature of Windows Containers, it is only required for volume mounting in Linux containers but is required to share the volume where the Dockerfile is located.

El pase de diapositivas requiere JavaScript.


So what does this plug-in do? Well, it basically makes easier to generate the artifacts that are required to deploy ASP.NET Core Web Apps in Docker. This is achieved via scaffolding with yeoman. yo docker scaffolds the files (incl. docker file,  docker compose and the build script) into a project and then the language services make authoring Dockerfiles easier.


Once you have the scaffolded files in place you can start to debug and modify the source code until is good to commit to the source code repo.



Javier Andrés Cáceres Alvis

Microsoft Most Valuable Professional – MVP

Intel Black Belt Software Developer

My presentation in the Azure Dublin meetup about Azure Container Services, Docker Swarm and DC/OS


Back in July I presented the session “Debugging Containers and running clusters in ACS with DC/OS or Swarm” in the Azure Dublin meetup held in the NDRC:

Debugging Containers and running clusters in ACS with DC/OS or Swarm

Wednesday, Jul 13, 2016, 5:30 PM

Location details are available to members only.

47 Azurees Went

Hi all! Thanks to everyone who attended Decoded back in the beginning of May. It was a great few days and I hope those of you who joined us enjoyed it.Since the event, Javier Caceres has approached us with some good follow up content that he’d like to share with this community. Below is a short description and a bit of background on Javier.Event …

Check out this Meetup →

During this presentation I explained the basic concepts of Azure Container Services, Mesosphere and I even built a container using the nginx image and a ASP.NET Core app.

For some reason I forgot to share this presentation before, but no worries, I remembered this today and uploaded to my YouTube channel. Enjoy!

Javier Andrés Cáceres Alvis

Microsoft Most Valuable Professional – MVP

Intel Black Belt Software Developer



Using Eclipse Neon 4.6.1 and the Docker Tools plug-in 2.1

Previously I reviewed the Docker Tools plug-in version 1.0 running on Eclipse Mars 4.5: https://jacace.wordpress.com/2016/03/25/connecting-eclipse-on-windows-to-remote-docker-daemon/. Today I updated the review to use the newer Eclipse Neon 4.6.1 and the Docker Tools 2.1. I didn’t find any specific update of the plugin v2.x for Eclipse Oxygen 4.7

The core functionality hasn’t changed much, there are only two brand new capabilities: one to connect with the container shell/terminal and another one to “Open Image Hierarchy”, plus more than 50 bug fixes. To install this plug-in simply go to Help > Eclipse Marketplace > and enter docker and you will get the following results.


Select the option “Eclipse Docker Tooling 2.1.0”. Once installed, you need to establish a new connection with a Docker host. You will also need to bind your daemon to the host IP/port using the following command (note: the switch -d is only supported in version 1.9 and older versions): docker -H IP_ADDRESS:PORT -d &

[note: I also installed the Docker Editor provided by Open Analytics but is quite basic at the moment. It only does syntax highlighting and is not signed so you will get the warning seen below ]


The version 2.1 of the plug-in shows the settings and properties of the Docker host as seen below.


From this version you can also run/tag/push/pull an image and setup a new connection to a docker registry as seen below:

The run new container window hasn’t changed considerably since last version, so you can still specify the image name, environment variables, etc as seen below:


More info here.


Javier Andrés Cáceres Alvis

Microsoft Most Valuable Professional – MVP

Intel Black Belt Software Developer

How to squash a docker image?

Docker images tend to become bigger very quickly.

You can reduce the image size squashing the image. There are several utilities to squash an image, we will use https://github.com/jwilder/docker-squash

Use the following commands to download and extract the utility:
wget https://github.com/jwilder/docker-squash/releases/download/v0.2.0/docker-squash-linux-amd64-v0.2.0.tar.gz

sudo tar -C /usr/local/bin -xzvf docker-squash-linux-amd64-v0.2.0.tar.gz

One you have copied docker-squash you can piping your commands as described below (note that you can fork any shell command after the docker load):

docker save 75e2c7769b | ./docker-squash -from root -t repositoryId | docker load & <your_forked_command>

All parameters are self explanatory except -from root. If you don’t use this parameter the base image (FROM statement) is kept separately as seen in the circle pointed by the first arrow in the image below. If you use it then the FROM statement is also squashed as seen in the circle pointed by the second arrow.


Note that Image IDs are different/unique even though they’re both based on the same image.

Javier Andrés Cáceres Alvis

Microsoft Most Valuable Professional – MVP

Intel Black Belt Software Developer

How to clean up dangling / intermediate Docker images?

An intermediate image is an image with the tag <none>:<none>, which means that they’re untagged images but they’re still tracked by Docker. They are created when the first image layer is downloaded/pulled during a docker pull. You can see them with the command: docker images -a

Some of these intermediate images are not used, which means they’re dangling images which eats up disk space in your docker host. Images might still exist even if the container is in exited state.

Use the following commands to prune/clean-up docker images and containers in your docker host:

  • Command to stop all running containers
    • docker stop $(docker ps -a -q)
  • Command to delete all containers
    • docker rm $(docker ps -a -q)
  • Command to specifically delete exited containers
    • docker rm ‘docker ps -aq –no-trunc –filter “status=exited”‘
  • Command to remove dangling images:
    • docker rmi ‘docker images –filter ‘dangling=true’ -q –no-trunc’
  • Command to delete all images
    • docker rmi $(docker images -q)
  • Starting with docker 1.13 (Sept 2016) you can use the command “docker system prune” which cleans the stopped containers, empty volumes and orphan images.

For more information check: http://www.projectatomic.io/blog/2015/07/what-are-docker-none-none-images/

Javier Andrés Cáceres Alvis

Microsoft Most Valuable Professional – MVP

Intel Black Belt Software Developer

Docker Global Mentor Week 2016 – Dublin

I just signed up to present  a dev topic to other community members interested in using Docker as promised previously:

This means that I will be presenting how to develop/debug web apps in the .Net Core / Visual Studio / C# for Docker and how to run Docker Swarm in Azure.

When? Thursday, November 17, 2016 6:30 PM to 8:30 PM

Where? Kings Building, May Lane, Smithfield, Dublin 1, Dublin, Dublin

What? Docker Global Mentor Week Meetup

More information in the link below:

Docker Global Mentor Week Meetup

Thursday, Nov 17, 2016, 6:30 PM

Kings Building, May Lane, Smithfield, Dublin 1, Dublin Dublin, IE

96 Dockers Attending

Hi All,For our next meetup we’ll return to Workday for Global Mentor Week. Whether you are a mentor who would like to give a brief presentation on a topic close to your heart or someone who is interested in learning, we’ll have something interesting for you.Please confirm in the RSVP whether you can provide mentorship and whether you have a topic…

Check out this Meetup →

More info on this global initiative here.


Javier Andrés Cáceres Alvis

Microsoft Most Valuable Professional – MVP

Intel Black Belt Software Developer


Free .NET training in Dublin

I want to share the following info for people wanting to learn something new about Web Development in ASP.NET:
What? A free session titled “Introduction, about Tools and Frameworks”
When? Wednesday, October 26, 2016 – 6:30 PM
Where? Connaught House, 2nd floor, Burlington Rd, Dublin 4, Dublin (map)
This is brought to you by my Microsoft MVP colleague @hhrvoje

How to use GitLFS?

GitLFS is a good option for storing blobs such as binaries or any large non-source code artifact. This blog post shows you how to use GitLFS.

If you haven’t installed GitLFS just yet, then you need to install it first by entering the line below: git lfs install . Also, if haven’t created a git repo then you need to run the command git init.

If you already have a remote git repo then you can simply clone it using the well known command git clone <git_server_url>.

You need to configure your GitLFS server. Edit the git config file by adding the following sections:



[lfs <git_lfs_server_url>]


Also add the following gitlfs config file:



Then the most important part is tracking the files you wish to store in the GitLFS server. A GitLFS server can be the same git server or a separate / dedicated server. To achieve this you can enter git lfs track “*.<file_extension>”

The next steps are straight forward, you simply run the usual commands git add <file_or_directory_path>, git commit -m “<commit_description>” and git push -u origin all. This works behind the scenes during git pull / push, so if you check your GitLFS server afterwards you will notice that the git server will only store pointers to the actual file in GitLFS server.

If you’re using a self-signed certificate on your GitLFS server then you might need to run the following line too: git config –global –add http.sslVerify false .

I hope this saves you sometime in your next gitlfs related endeavor.

[ Update 10Oct2016: if you get the error “Your local changes to the following files would be overwritten by merge”, you will need to do the following -more info here-]

git checkout HEAD^<file_to_overwrite>

git pull -f

[ Update 10Oct2016: don’t forget to create a dev branch and merge it once your binaries have been pushed into the repo –more info here-]
git checkout -b dev_branch

git checkout master

git merge dev_branch

Javier Andrés Cáceres Alvis

Microsoft Most Valuable Professional – MVP

Intel Black Belt Software Developer

Blog de WordPress.com.

Subir ↑