Fix Docker Error for exec user process caused "no such file or directory"

Published on 2019-04-02


standard_init_linux.go:207: exec user process caused "no such file or directory"


Make sure all of the scripts that are being run in the container (this is especially true for are using a process that exists.

If it is an, you probably need to make sure to do this:

- #!/bin/bash
+ #!/bin/sh

If you need bash features, use an Alpine distro with bash already installed or install it in the Dockerfile.

When Do I See It Most?

When I'm using Docker and the Dockerfile is alpine linux, I sometimes forget that it doesn't have bash installed and accidentally add the sha-bang for #!/bin/bash. 99.9% of the time that's okay, so I change it to #!/bin/sh.

This is especially true when I'm making a GitHub Action.

Find this article useful?

Tags: GitHub ActionsDocker

graphic I made of the colorado flag's C
Made with curiosity in Colorado