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

docker log-driver #72

Open
aberrios85 opened this issue Nov 19, 2015 · 2 comments
Open

docker log-driver #72

aberrios85 opened this issue Nov 19, 2015 · 2 comments

Comments

@aberrios85
Copy link

Wondering how to set the log-driver for the container.

want this (docker inspect):

"LogConfig": {
            "Type": "syslog",
            "Config": {
                "syslog-address": "udp://10.0.10.19:35514",
                "syslog-facility": "local0"
            }
        },

always get this after a chef provision

"LogConfig": {
            "Type": "json-file",
            "Config": {
            }
        },

recipe:

require 'chef/provisioning'
require 'chef/provisioning/docker_driver'

with_driver 'docker'

with_machine_options({
  convergence_options: {
     ssl_verify_mode: :verify_none
  },
  docker_options: {
    base_image: {
     :name => 'centos',
     :repository => 'centos',
     :tag => 'latest'
    },
    logconfig: {
      :type => "syslog",
      config: {
        :syslog_address => 'udp://10.0.10.19:32512',
        :syslog_facility => 'local0'
      }
    },
    :ports => ["5060:5060","5060:5060/udp","10000-10009:10000-10009/udp","5038:5038","8088:8088","8089:8089"],
    :command => 'asterisk -v'
  }
})

@marc-
Copy link
Contributor

marc- commented Nov 19, 2015

There is limited number of docker options supported by CPD (you can see all of them in README.md). And LogConfig not in the list currently. If you can add it, go ahead and make a PR.

@jkeiser
Copy link
Contributor

jkeiser commented Mar 15, 2016

@aberrios85 #83 adds all options, including this one. Mind giving it a whirl? docker_options: { log_driver: "syslog", log_config: [ "syslog_address=udp://10.0.10.19:32512", "syslog_facility=local0" ] } is what I expect to work. It's intended to mimick the docker command line.

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

No branches or pull requests

3 participants