Skip to content
This repository has been archived by the owner on Jul 6, 2018. It is now read-only.

machine_image doesn't respect command #97

Open
maxivak opened this issue Jun 9, 2016 · 2 comments · May be fixed by #98
Open

machine_image doesn't respect command #97

maxivak opened this issue Jun 9, 2016 · 2 comments · May be fixed by #98

Comments

@maxivak
Copy link

maxivak commented Jun 9, 2016

I am trying to create a new docker image with my command like this:

require 'chef/provisioning'


with_driver 'docker'
machine_image 'myimage' do
  action :create

  recipe 'mycookbook::default'



  machine_options docker_options: {
      base_image: {
          name: 'ubuntu',
          repository: 'ubuntu',
          tag: '14.04'
      },
      :command => '/usr/bin/supervisord -c /etc/supervisord.conf',

    }


end

but the final image is created with starting command /bin/sh -c 'while true..."

How to build a docker image with custom command?

@monkey1016
Copy link

I ran into the same issue. I have a pull request that I think might help.

@monkey1016 monkey1016 linked a pull request Jul 6, 2016 that will close this issue
@monkey1016
Copy link

@maxivak The pull request works for my use case, and I think it will cover most scenarios. It should respect :command and :entrypoint when creating an image.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Development

Successfully merging a pull request may close this issue.

2 participants