Intermediate Container Incorrectly Assumes /bin/echo Available #919

Closed
alunduil opened this Issue Feb 3, 2015 · 16 comments

Comments

Projects
None yet
@alunduil
Contributor

alunduil commented Feb 3, 2015

When using the etcd image from the CoreOS guys: quay.io/coreos/etcd, I get the following error from docker-compose:

Cannot start container a6da0c7e877b1075696d64802f7e159b7660e5cd395064b891ab5712c74bc266: exec: "/bin/echo": stat /bin/echo: no such file or directory

This is when starting the following datastore service from docker-compose.yml:

datastore:
  image: quay.io/coreos/etcd:latest
  ports:
   - "4001:4001"

I found https://github.com/docker/fig/blob/fd30920aac060b03d6e67ec5c3170f670a73d00e/compose/service.py#L288, which indicates that this assumption is hard coded and containers must provide /bin/echo in order to be usable by docker-compose. Is there any way we can remove this assumption so a greater number of containers are usable?

@tianon

This comment has been minimized.

Show comment
Hide comment
@tianon

tianon Feb 3, 2015

Member

This is related to the discussion in #517 👍

Member

tianon commented Feb 3, 2015

This is related to the discussion in #517 👍

@bfirsh

This comment has been minimized.

Show comment
Hide comment
@bfirsh

bfirsh Feb 4, 2015

Contributor

👍 solution is #874 I believe

Contributor

bfirsh commented Feb 4, 2015

👍 solution is #874 I believe

abesto added a commit to abesto/abesto-net-docker that referenced this issue Feb 12, 2015

@tristan0x

This comment has been minimized.

Show comment
Hide comment
@tristan0x

tristan0x Feb 27, 2015

I encountered the same issue while using minimalist tianon/true Docker image that only provides /trueutility.
I am using Docker 1.5 and Docker Compose 1.1.0.
You can use the following YAML file to reproduce the issue

data:
  image: tianon/true
  volumes:
    - /data
$ docker-compose up
Creating tmp_data_1...
Attaching to tmp_data_1
tmp_data_1 exited with code 0
Gracefully stopping... (press Ctrl+C again to force)

$ docker-compose up
Recreating tmp_data_1...
Cannot start container     3c29600d4043393936497d39c9c8c355f2427f4a34c86ea65d4ed3d315c50960: exec: "/bin/echo": stat /bin/echo: no such file or directory

As I want to keep data-only container as small as possible, my workaround is yet another cogniteev/echo providing /bin/echo executable.

I encountered the same issue while using minimalist tianon/true Docker image that only provides /trueutility.
I am using Docker 1.5 and Docker Compose 1.1.0.
You can use the following YAML file to reproduce the issue

data:
  image: tianon/true
  volumes:
    - /data
$ docker-compose up
Creating tmp_data_1...
Attaching to tmp_data_1
tmp_data_1 exited with code 0
Gracefully stopping... (press Ctrl+C again to force)

$ docker-compose up
Recreating tmp_data_1...
Cannot start container     3c29600d4043393936497d39c9c8c355f2427f4a34c86ea65d4ed3d315c50960: exec: "/bin/echo": stat /bin/echo: no such file or directory

As I want to keep data-only container as small as possible, my workaround is yet another cogniteev/echo providing /bin/echo executable.

nickstenning added a commit to hypothesis/h that referenced this issue Mar 11, 2015

Add docker-compose.yml for building dev environ
This adds a docker-compose.yml, used (unsurprisingly) by
docker-compose[1] to assemble an application out of multiple pieces.
This configuration sets up a basic development environment for h, with
the following services:

- web (the application)
- elasticsearch
- nsqd

At the moment postgres is not configured, and the application will
default to using an SQLite database within the container.

The simplest way to run this all at the moment is probably to start the
services in the background first:

    docker-compose up -d elasticsearch nsqd

And then start the web application without recreating the dependency
containers. This is to work around docker-compose issue #919[2].

    docker-compose up --no-deps --no-recreate web

This will install development dependencies and start the web
application. You can then visit the application at port 8000 on the
docker host.

[1]: https://docs.docker.com/compose/
[2]: docker/compose#919

nickstenning added a commit to hypothesis/h that referenced this issue Mar 12, 2015

Add docker-compose.yml for building dev environ
This adds a docker-compose.yml, used (unsurprisingly) by
docker-compose[1] to assemble an application out of multiple pieces.
This configuration sets up a basic development environment for h, with
the following services:

- web (the application)
- elasticsearch
- nsqd

At the moment postgres is not configured, and the application will
default to using an SQLite database within the container.

The simplest way to run this all at the moment is probably to start the
services in the background first:

    docker-compose up -d elasticsearch nsqd

And then start the web application without recreating the dependency
containers. This is to work around docker-compose issue #919[2].

    docker-compose up --no-deps --no-recreate web

This will install development dependencies and start the web
application. You can then visit the application at port 8000 on the
docker host.

[1]: https://docs.docker.com/compose/
[2]: docker/compose#919

nickstenning added a commit to hypothesis/h that referenced this issue Mar 12, 2015

Add docker-compose.yml for building dev environ
This adds a docker-compose.yml, used (unsurprisingly) by
docker-compose[1] to assemble an application out of multiple pieces.
This configuration sets up a basic development environment for h, with
the following services:

- web (the application)
- elasticsearch
- nsqd

At the moment postgres is not configured, and the application will
default to using an SQLite database within the container.

The simplest way to run this all at the moment is probably to start the
services in the background first:

    docker-compose up -d elasticsearch nsqd

And then start the web application without recreating the dependency
containers. This is to work around docker-compose issue #919[2].

    docker-compose up --no-deps --no-recreate web

This will install development dependencies and start the web
application. You can then visit the application at port 8000 on the
docker host.

[1]: https://docs.docker.com/compose/
[2]: docker/compose#919
@tj

This comment has been minimized.

Show comment
Hide comment
@tj

tj Apr 6, 2015

having this issue with nsqio/nsq as well

Client version: 1.5.0
Client API version: 1.17
Go version (client): go1.4.1
Git commit (client): a8a31ef
OS/Arch (client): darwin/amd64
Server version: 1.5.0
Server API version: 1.17
Go version (server): go1.4.1
Git commit (server): a8a31ef
docker-compose 1.1.0

tj commented Apr 6, 2015

having this issue with nsqio/nsq as well

Client version: 1.5.0
Client API version: 1.17
Go version (client): go1.4.1
Git commit (client): a8a31ef
OS/Arch (client): darwin/amd64
Server version: 1.5.0
Server API version: 1.17
Go version (server): go1.4.1
Git commit (server): a8a31ef
docker-compose 1.1.0
@saks

This comment has been minimized.

Show comment
Hide comment
@saks

saks Apr 7, 2015

+1, the same problem here

saks commented Apr 7, 2015

+1, the same problem here

@balboah

This comment has been minimized.

Show comment
Hide comment

balboah commented Apr 7, 2015

+1

@balboah

This comment has been minimized.

Show comment
Hide comment
@balboah

balboah Apr 7, 2015

Always happens at 2nd fig up that uses nsqio/nsq container

balboah commented Apr 7, 2015

Always happens at 2nd fig up that uses nsqio/nsq container

@marcosnils

This comment has been minimized.

Show comment
Hide comment
@marcosnils

marcosnils Apr 13, 2015

Contributor

Same issue here. Any update about when this will resolved?

Contributor

marcosnils commented Apr 13, 2015

Same issue here. Any update about when this will resolved?

dukje added a commit to pfadipatria/dockerfiles that referenced this issue Apr 16, 2015

@zeisss

This comment has been minimized.

Show comment
Hide comment

zeisss commented Apr 21, 2015

+1

@laurent35240

This comment has been minimized.

Show comment
Hide comment

+1

@tbal

This comment has been minimized.

Show comment
Hide comment

tbal commented Apr 22, 2015

+1

@MitchK

This comment has been minimized.

Show comment
Hide comment

MitchK commented Apr 24, 2015

+1

overlordtm pushed a commit to overlordtm/docker-magento that referenced this issue May 5, 2015

@overlordtm overlordtm referenced this issue in kojiromike/docker-magento May 5, 2015

Merged

Work around docker-compose bug #919 (missing /bin/echo) #13

@marchev

This comment has been minimized.

Show comment
Hide comment
@marchev

marchev May 5, 2015

+1

I am also able to reproduce this issue when trying to bring up containers based on the following images:

  • tomcat:8-jre8
  • mongo:3

marchev commented May 5, 2015

+1

I am also able to reproduce this issue when trying to bring up containers based on the following images:

  • tomcat:8-jre8
  • mongo:3
@aanand

This comment has been minimized.

Show comment
Hide comment
@aanand

aanand May 6, 2015

Contributor

This will be fixed by #1349.

Contributor

aanand commented May 6, 2015

This will be fixed by #1349.

@karlkfi karlkfi referenced this issue in mesosphere/kubernetes-mesos May 18, 2015

Merged

Add docker & docker-compose scripts #282

@jacyzon jacyzon referenced this issue in paz-sh/paz-orchestrator May 28, 2015

Merged

migrate from fig to docker-compose #8

vidarl added a commit to ezsystems/ezpublish-docker that referenced this issue Jun 30, 2015

@morenoh149

This comment has been minimized.

Show comment
Hide comment
@morenoh149

morenoh149 Jul 21, 2015

has this been fixed? I'm trying to run kubernetes with docker-compose.

# docker-compose.yml
etcd:  
  image: gcr.io/google_containers/etcd:2.0.9
  net: host
  command: ['/usr/local/bin/etcd', '--bind-addr=0.0.0.0:4001', '--data-dir=/var/etcd/data']
...
$ docker-compose up                           
Recreating gettingstarted_apiserver_1...
Recreating gettingstarted_kubelet_1...
Recreating gettingstarted_controller_1...
Recreating gettingstarted_proxy_1...
Recreating gettingstarted_etcd_1...
Cannot start container eceaf23e94a5fec0e0edea5623aa824e01c944d96b8815c0d4aacfa23d77d81f: [8] 
System error: exec: "/bin/echo": stat /bin/echo: no such file or directory

I'm on osx.

has this been fixed? I'm trying to run kubernetes with docker-compose.

# docker-compose.yml
etcd:  
  image: gcr.io/google_containers/etcd:2.0.9
  net: host
  command: ['/usr/local/bin/etcd', '--bind-addr=0.0.0.0:4001', '--data-dir=/var/etcd/data']
...
$ docker-compose up                           
Recreating gettingstarted_apiserver_1...
Recreating gettingstarted_kubelet_1...
Recreating gettingstarted_controller_1...
Recreating gettingstarted_proxy_1...
Recreating gettingstarted_etcd_1...
Cannot start container eceaf23e94a5fec0e0edea5623aa824e01c944d96b8815c0d4aacfa23d77d81f: [8] 
System error: exec: "/bin/echo": stat /bin/echo: no such file or directory

I'm on osx.

@dnephin

This comment has been minimized.

Show comment
Hide comment
@dnephin

dnephin Jul 22, 2015

Contributor

Yup, this was fixed by #1349 which is in 1.3.x

Contributor

dnephin commented Jul 22, 2015

Yup, this was fixed by #1349 which is in 1.3.x

@dnephin dnephin closed this Jul 22, 2015

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment