Skip to content

OCI runtime create failed: container_linux.go:344: starting container process caused "exec: \"/bin/bash\": stat /bin/bash: no such file or directory": unknown #1437

@qiulang

Description

@qiulang

Use the code from here https://github.com/docker-library/docs/tree/master/nginx#using-environment-variables-in-nginx-configuration

command: /bin/bash -c "envsubst < /etc/nginx/conf.d/mysite.template > /etc/nginx/conf.d/default.conf && exec nginx -g 'daemon off;'"

Got the error,

ERROR: for xxx_1 Cannot start service xxx: OCI runtime create failed: container_linux.go:344: starting container process caused "exec: "/bin/bash": stat /bin/bash: no such file or directory": unknown

ERROR: for xxx Cannot start service xxx: OCI runtime create failed: container_linux.go:344: starting container process caused "exec: "/bin/bash": stat /bin/bash: no such file or directory": unknown
ERROR: Encountered errors while bringing up the project.

Change /bin/bash to /bin/sh then works.

But why ?

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions