command doens't seem to be correctly passed to the Docker API
hanCU opened this issue · 1 comments
hanCU commented
In my config file, I have command set to be:
command ['/bin/bash', '-c', './docker_sourcing_run.sh']
but this doesn't seem to have any effects when I deploy. The container dies immediately because the "Cmd" seems to be "/bin/bash" in the log:
I, [2014-11-06T22:16:24.147296 #30221] INFO -- : {"State"=>{"Running"=>true, "Paused"=>false, "Restarting"=>false, "Pid"=>30282, "ExitCode"=>0, "StartedAt"=>"2014-11-06T22:16:24.134526188Z", "FinishedAt"=>"0001-01-01T00:00:00Z"}, "ID"=>"b570360ab7b1097317e771c071a88ed02d860e4e793496bbfcbcfad9fd0dbf49", "Created"=>"2014-11-06T22:16:23.956575973Z", "Path"=>"/bin/bash", "Args"=>[], "Config"=>{"Hostname"=>"localhost", "Domainname"=>"", "User"=>"", "Memory"=>0, "MemorySwap"=>0, "CpuShares"=>0, "Cpuset"=>"", "AttachStdin"=>false, "AttachStdout"=>false, "AttachStderr"=>false, "PortSpecs"=>nil, "ExposedPorts"=>{"3306/tcp"=>{}, "8888/tcp"=>{}}, "Tty"=>false, "OpenStdin"=>false, "StdinOnce"=>false, "Env"=>["PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin"], "Cmd"=>["/bin/bash"], "Image"=>"43b4f9aba9cfcbcbf3d19246ae375d8e9747383d6ba3b0a9b19e16a1e726384a", "Volumes"=>{"/circleup/logs"=>{}, "/circleup/model/company-suitability"=>{}, "/circleup/sourcing"=>{}}, "WorkingDir"=>"/circleup/sourcing", "Entrypoint"=>nil, "NetworkDisabled"=>false, "OnBuild"=>nil, "SecurityOpt"=>nil}, "Image"=>"43b4f9aba9cfcbcbf3d19246ae375d8e9747383d6ba3b0a9b19e16a1e726384a", "NetworkSettings"=>{"IPAddress"=>"172.17.0.13", "IPPrefixLen"=>16, "MacAddress"=>"02:42:ac:11:00:0d", "Gateway"=>"172.17.42.1", "Bridge"=>"docker0", "PortMapping"=>nil, "Ports"=>{"3306/tcp"=>nil, "8888/tcp"=>[{"HostIp"=>"0.0.0.0", "HostPort"=>"8888"}]}}, "ResolvConfPath"=>"/var/lib/docker/containers/b570360ab7b1097317e771c071a88ed02d860e4e793496bbfcbcfad9fd0dbf49/resolv.conf", "HostnamePath"=>"/var/lib/docker/containers/b570360ab7b1097317e771c071a88ed02d860e4e793496bbfcbcfad9fd0dbf49/hostname", "HostsPath"=>"/var/lib/docker/containers/b570360ab7b1097317e771c071a88ed02d860e4e793496bbfcbcfad9fd0dbf49/hosts", "Name"=>"/stupefied_brown", "Driver"=>"aufs", "ExecDriver"=>"native-0.2", "MountLabel"=>"", "ProcessLabel"=>"", "AppArmorProfile"=>"", "RestartCount"=>0, "Volumes"=>{"/circleup/logs"=>"/circleup/logs", "/circleup/model/company-suitability"=>"/circleup/model/company-suitability", "/circleup/sourcing"=>"/circleup/sourcing"}, "VolumesRW"=>{"/circleup/logs"=>true, "/circleup/model/company-suitability"=>true, "/circleup/sourcing"=>true}, "HostConfig"=>{"Binds"=>["/circleup/model/company-suitability:/circleup/model/company-suitability", "/circleup/logs:/circleup/logs", "/circleup/sourcing:/circleup/sourcing"], "ContainerIDFile"=>"", "LxcConf"=>nil, "Privileged"=>false, "PortBindings"=>{"8888/tcp"=>[{"HostIp"=>"0.0.0.0", "HostPort"=>"8888"}]}, "Links"=>nil, "PublishAllPorts"=>false, "Dns"=>nil, "DnsSearch"=>nil, "ExtraHosts"=>nil, "VolumesFrom"=>nil, "Devices"=>nil, "NetworkMode"=>"", "CapAdd"=>nil, "CapDrop"=>nil, "RestartPolicy"=>{"Name"=>"", "MaximumRetryCount"=>0}}}
Am I doing something wrong here?
relistan commented
Good catch! Fixed.