Closed nani-ar closed 7 years ago
What's your ENTRYPOINT
? This looks like a bad ENTRYPOINT
or CMD
definition to the container.
Okay, that's the problem and why you are getting that error message. It's trying to execute all of that as a single binary and can't find it.
Take a look at the CMD
and ENTRYPOINT
documentation ... specifically the array style. You probably only want to specify ENTRYPOINT
or CMD
and not both.
https://docs.docker.com/engine/reference/builder/#cmd https://docs.docker.com/engine/reference/builder/#entrypoint
You could do this a few ways:
1) Leave the upstream container ENTRYPOINT
and specify CMD
ENTRYPOINT ["/usr/local/bin/consul-backinator"]
CMD ["backup", "-addr=10.0.1.50:8500", "-file=s3://accesskey:secretkey@bakup-consul/consul_backup/?region=us-west-2"]
2) Do not specify an ENTRYPOINT
(use the docker default) and specify CMD
CMD ["/usr/local/bin/consul-backinator", "backup", "-addr=10.0.1.50:8500", "-file=s3://accesskey:secretkey@bakup-consul/consul_backup/?region=us-west-2"]
3) Do not modify theDockerfile
and pass the arguments at runtime
docker run myena/consul-backinator backup -addr=10.0.1.50:8500 -file=s3://accesskey:secretkey@bakup-consul/consul_backup/?region=us-west-2
This part of the documentation provides a good description:
https://docs.docker.com/engine/reference/builder/#understand-how-cmd-and-entrypoint-interact
yeah, its working, thank you
This is the same issue and solution as reported in #29
Error trace .
{"line":"2017-08-31T17:06:19Z [WARN] Error with docker; stopping container module=\"TaskEngine\" task=\"ConsulBackup:3 arn:aws:ecs:us-west-2:776609208984:task/a03e35fe-2e1e-4a73-922a-e98f63a82b6f, Status: (CREATED-\u003eRUNNING) Containers: [ConsulBackup (RUNNING-\u003eRUNNING),]\" container=\"ConsulBackup(myena/consul-backinator:latest) (RUNNING-\u003eRUNNING)\" err=\"API error (404): oci runtime error: container_linux.go:247: starting container process caused \"exec: \\"backup -addr=10.0.1.50:8500 -file=s3://bakup-consul/consul_backup/first.bak?region=us-west-2\\": stat backup -addr=10.0.1.50:8500 -file=s3://bakup-consul/consul_backup/first.bak?region=us-west-2: no such file or directory\"","source":"stdout","tag":"ecs-agent/236df33fb65d"}