Skip to content

An example of using the Puppet Docker module to build images and run the resulting containers

Notifications You must be signed in to change notification settings

garethr/puppet-docker-vnext-example

Repository files navigation

Docker Puppet ASP.NET Example

The Puppet Docker module is a great way of installing and managing Docker on a host, but it also allows for some basic container management.

This repo contains a fairly simple example using Vagrant to launch a Linux virtual machine, then Puppet to install Docker, build an image and run a container. For added spice the container runs a ASP.NET vNext application.

The ASP.NET vNext application example is taken from this excellent blog post from MSDN about running ASP.NET apps in linux containers.

Usage

vagrant up --provider virtualbox
vagrant provision

This will take a little time as it launches a virtual machine and downloads lots of software onto it.

What happened?

Once up you should be able to access 10.20.1.11:5004 and it should show the hello world ASP.NET example.

The text is coming from a docker container on the host app1.

Under the hood

  1. The instance (app1) installs docker, builds an image using the Dockerfile and runs a container based on that image.

The interesting Puppet code is found in the application module.

About

An example of using the Puppet Docker module to build images and run the resulting containers

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published