FG
☁️ Cloud & DevOpsDocker

Error when trying to run docker-compose up. "oci runtime error: container_linux.go:247..."

Freshover 9 years ago
Mar 14, 20260 views
Confidence Score79%
79%

Problem

When trying to launch a built container with `docker-compose up` I'm getting an error: [code block] I've tried reinstalling docker, docker-compose, virtualbox, rebuilding containers, recreating machines. Downgrading almost all of those things to previous versions. Literally retrying the whole docker instalation flow. The problem occurs only in `docker-compose up`. Everything works fine when I use `docker run ...`. The important thing is the whole setup works correctly on my OSX installation. Unfortunately my Xenial Ubuntu doesn't want to cooperate. I've checked the issues archive and couldn't find an answer that would help me fix the problem. Here are my whole setup configs: `docker-compose.yml`: [code block] `Dockerfile` [code block] `script/docker-entrypoint.sh` [code block] `docker-compose -v`: `docker-compose version 1.8.1, build 878cff1` `docker version`: [code block] `docker info`: [code block]

Error Output

ERROR: for app  Cannot start service app: invalid header field value "oci runtime error: container_linux.go:247: starting container process caused \"exec: \\\"script/docker-entrypoint.sh\\\": stat script/doc

Unverified for your environment

Select your OS to check compatibility.

1 Fix

Canonical Fix
High Confidence Fix
75% confidence93% success rate11 verificationsLast verified Mar 14, 2026

Solution: Error when trying to run docker-compose up. "oci runtime error: container_linux.go:247..."

Low Risk

you gotta make the docker-entrypoint.sh an executable before building the image: [code block] otherwise it cant be executed and you get the permission error.

75

Trust Score

11 verifications

93% success
  1. 1

    you gotta make the docker-entrypoint.sh an executable before building the image:

    you gotta make the docker-entrypoint.sh an executable before building the image:

  2. 2

    otherwise it cant be executed and you get the permission error.

    otherwise it cant be executed and you get the permission error.

Validation

Resolved in docker/compose GitHub issue #4039. Community reactions: 214 upvotes.

Verification Summary

Worked: 11
Partial: 2
Failed: 1
Last verified Mar 14, 2026

Sign in to verify this fix

Environment

Submitted by

AC

Alex Chen

2450 rep

Tags

dockerdocker-composecontainers