Keep Chef out of your Docker containers


#1

Hello,

For the people interested in provisioning Docker images with Chef, but
keeping the tool and your cookbooks out of your final image, I explain my
setup in this article:

http://ringo.de-smet.name/2015/03/keep-chef-out-of-your-docker-containers/

Comments welcome!

Ringo


#2

One question - why not just end your docker file with deleting /opt/chef and /var/chef? :slight_smile:

Sent from my iPhone

On Mar 15, 2015, at 4:07 AM, Ringo De Smet ringo.desmet@gmail.com wrote:

Hello,

For the people interested in provisioning Docker images with Chef, but keeping the tool and your cookbooks out of your final image, I explain my setup in this article:

http://ringo.de-smet.name/2015/03/keep-chef-out-of-your-docker-containers/

Comments welcome!

Ringo


#3

It would still be in a previous layer, and therefore not reduce the
container size on commit.
-s

On Sun, Mar 15, 2015 at 1:11 PM, Adam Jacob adam@chef.io wrote:

One question - why not just end your docker file with deleting /opt/chef and
/var/chef? :slight_smile:

Sent from my iPhone

On Mar 15, 2015, at 4:07 AM, Ringo De Smet ringo.desmet@gmail.com wrote:

Hello,

For the people interested in provisioning Docker images with Chef, but
keeping the tool and your cookbooks out of your final image, I explain my
setup in this article:

http://ringo.de-smet.name/2015/03/keep-chef-out-of-your-docker-containers/

Comments welcome!

Ringo


#4

I have been working on something similar to this, our approaches seem to be
close to the same.

I like the idea of mounting the cookbooks and misc data as volumes but I
have not had a chance to use docker-compose, how do you see this
integrating into a CI pipeline?

On Sun, Mar 15, 2015 at 10:13 AM, Sean OMeara someara@chef.io wrote:

It would still be in a previous layer, and therefore not reduce the
container size on commit.
-s

On Sun, Mar 15, 2015 at 1:11 PM, Adam Jacob adam@chef.io wrote:

One question - why not just end your docker file with deleting /opt/chef
and
/var/chef? :slight_smile:

Sent from my iPhone

On Mar 15, 2015, at 4:07 AM, Ringo De Smet ringo.desmet@gmail.com
wrote:

Hello,

For the people interested in provisioning Docker images with Chef, but
keeping the tool and your cookbooks out of your final image, I explain my
setup in this article:

http://ringo.de-smet.name/2015/03/keep-chef-out-of-your-docker-containers/

Comments welcome!

Ringo


#5

Brandon,

It won’t fit a Docker Hub Automated Build repository but any other CI that
supports Docker (excludes most hosted CI’s for the moment) is able to run
any command.

My solution still needs some post-actions to tag and push the final image,
as well as clean up the intermediate Chef and cookbook data volume
containers.

Ringo

On 15 March 2015 at 19:20, Brandon Raabe brandocorp@gmail.com wrote:

I have been working on something similar to this, our approaches seem to
be close to the same.

https://github.com/brandocorp/docker-chef-provisioning

I like the idea of mounting the cookbooks and misc data as volumes but I
have not had a chance to use docker-compose, how do you see this
integrating into a CI pipeline?

On Sun, Mar 15, 2015 at 10:13 AM, Sean OMeara someara@chef.io wrote:

It would still be in a previous layer, and therefore not reduce the
container size on commit.
-s

On Sun, Mar 15, 2015 at 1:11 PM, Adam Jacob adam@chef.io wrote:

One question - why not just end your docker file with deleting
/opt/chef and
/var/chef? :slight_smile:

Sent from my iPhone

On Mar 15, 2015, at 4:07 AM, Ringo De Smet ringo.desmet@gmail.com
wrote:

Hello,

For the people interested in provisioning Docker images with Chef, but
keeping the tool and your cookbooks out of your final image, I explain
my
setup in this article:

http://ringo.de-smet.name/2015/03/keep-chef-out-of-your-docker-containers/

Comments welcome!

Ringo