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

Created on 18 Oct 2016  ·  83Comments  ·  Source: docker/compose

When trying to launch a built container with docker-compose up I'm getting an error:

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/docker-entrypoint.sh: no such file or directory\"\n"
ERROR: compose.cli.main.main: Encountered errors while bringing up the project.

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:

version: "2"
services:
  app:
    build: .
    volumes:
      - .:/app
    depends_on:
      - cache-redis
    links:
      - cache-redis
  nginx:
    image: nginx:1.11.1-alpine
    depends_on:
      - app
    links:
      - app
    ports:
      - "80:80"
    volumes:
      - ./config/nginx/app.conf:/etc/nginx/conf.d/default.conf
  cache-redis:
    image: redis:3.2.1-alpine
    volumes:
      - cache-redis:/var/lib/cache-redis/data

volumes:
  cache-redis:
    driver: local

Dockerfile

FROM jruby:9.1.2.0-jre-alpine

RUN apk --update --no-cache add build-base less git openssh

RUN mkdir -p /app

WORKDIR /app

COPY Gemfile Gemfile.lock ./

RUN gem install bundler && bundle install

COPY . ./

CMD ["script/docker-entrypoint.sh"]

script/docker-entrypoint.sh

#!/bin/sh
rm -f tmp/pids/server.pid
padrino s -h 0.0.0.0

docker-compose -v:
docker-compose version 1.8.1, build 878cff1

docker version:

Client:
 Version:      1.12.2
 API version:  1.24
 Go version:   go1.6.3
 Git commit:   bb80604
 Built:        Tue Oct 11 18:29:41 2016
 OS/Arch:      linux/amd64

Server:
 Version:      1.12.2
 API version:  1.24
 Go version:   go1.6.3
 Git commit:   bb80604
 Built:        Tue Oct 11 17:00:50 2016
 OS/Arch:      linux/amd64

docker info:

Containers: 6
 Running: 1
 Paused: 0
 Stopped: 5
Images: 15
Server Version: 1.12.2
Storage Driver: aufs
 Root Dir: /mnt/sda1/var/lib/docker/aufs
 Backing Filesystem: extfs
 Dirs: 37
 Dirperm1 Supported: true
Logging Driver: json-file
Cgroup Driver: cgroupfs
Plugins:
 Volume: local
 Network: bridge host null overlay
Swarm: inactive
Runtimes: runc
Default Runtime: runc
Security Options: seccomp
Kernel Version: 4.4.24-boot2docker
Operating System: Boot2Docker 1.12.2 (TCL 7.2); HEAD : 9d8e41b - Tue Oct 11 23:40:08 UTC 2016
OSType: linux
Architecture: x86_64
CPUs: 1
Total Memory: 995.9 MiB
Name: default
ID: G442:OWMQ:BPXD:7MK5:HM7J:R7PO:DNBP:ZSKI:HJH4:OCE4:UX36:M2PO
Docker Root Dir: /mnt/sda1/var/lib/docker
Debug Mode (client): false
Debug Mode (server): true
 File Descriptors: 21
 Goroutines: 38
 System Time: 2016-10-18T09:18:30.024046419Z
 EventsListeners: 0
Registry: https://index.docker.io/v1/
Labels:
 provider=virtualbox
Insecure Registries:
 127.0.0.0/8

Most helpful comment

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

chmod +x docker-entrypoint.sh

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

All 83 comments

I've managed to fix it. I had wrong permissions and needed to run docker-compose as sudo.

I am getting this error too, and sudo fixed it. However, there should be an alternative solution to this issue.

@michalwarda @jakerobers I am experiencing this issue too. I think you should reopen the issue.

I am using a pretty vanilla install of Docker for Mac, and I can't remember doing anything that would require this permission level on the docker-compose command.

I'm getting a similar error and unfortunately sudo doesn't fix this one.

ERROR: for grafana  Cannot start service grafana: invalid header field value "oci runtime error: container_linux.go:247: starting container process caused \"exec: \\\"/init-grafana-and-run.sh\\\": permission denied\"\n"

I had similar issue with my images and found this thread.
In my case, It turned out that mounting the volumes is the source of confusion.

In your case, please make sure that app.conf is an existing file.
./config/nginx/app.conf:/etc/nginx/conf.d/default.conf

This will mount your local app.conf inside of the docker container.
If it does not exist on your local machine, docker will create locally an "app.conf" directory, which is not what you would usually expect in this particular case.

I hope it will help you.

click on _icon tray Docker > Settings... > Shared Drivers_ and select checkbox _Shared:_ C and D
Maybe it`s help you!

I've noticed having a CMD line in a dockerfile and a -command parameter in a docker-compose file will also trigger this error.

This issue shouldn't be closed - it still happens, and sudo isn't really a good solution when needing to point docker-compose at a remote machine for deployment.

This is with docker-compose 1.9.0.

Interestingly, if I ssh into the machine, docker-compose up -d completes without an error. So, for me, this only happens when running remotely.

Odd thing is, the mount in the error message is for a local path (in bold below) - referred to relatively in my docker-compose, so perhaps this is a relative/absolute path problem with docker-compose.

ERROR: for nginx Cannot start service nginx: invalid header field value "oci runtime error:
container_linux.go:247: starting container process caused \"process_linux.go:359: container init caused
\\"rootfs_linux.go:53: mounting \\\\ "/data/www/aq/docker/nginx/default.conf \\\\" to rootfs \\\\"/var
/lib/docker/aufs/mnt/8e3b80c25d85b70b78ea479a5f68373e236fdd3dafd62b241495907ace62da2f\\\\"
at \\\\"/var/lib/docker/aufs/mnt
/8e3b80c25d85b70b78ea479a5f68373e236fdd3dafd62b241495907ace62da2f/etc/nginx/conf.d
/default.conf\\\\" caused \\\\"not a directory\\\\"\\"\"\n"

This is due to a line in docker-compose.yml trying to point nginx's configuration back to the local filesystem:

    volumes:
      - ./docker/nginx/default.conf:/etc/nginx/conf.d/default.conf

This should resolve to /home/root/docker on the remote, and /data/www/aq/docker locally. Instead, docker-compose seems to be trying to use the local path on the remote.

Happy to provide any other details/logs.

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

chmod +x docker-entrypoint.sh

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

Same issue here. No idea how it started yet.

Found it, I was not assigning options in the right order:

docker-compose run web -f docker-compose-prod.yml /bin/bash

fails while:

docker-compose run -f docker-compose-prod.yml web /bin/bash

works.

Those parameter order restrictions are quite of annoying. Never has so many issues with any Unix executable...

Been bashing my head into my keyboard trying to get this to work. Thanks for posting the fix!

This issue happens on my native docker on Mac too... no idea how to resolve it!

ERROR: for elasticsearch  Cannot start service elasticsearch: oci runtime error: container_linux.go:247: starting container process caused "process_linux.go:359: container init caused \"rootfs_linux.go:54: mounting \\\"/Users/mhuang/docker/elk/elasticsearch/config/elasticsearch.yml\\\" to rootfs \\\"/var/lib/docker/aufs/mnt/f41ff7a7a6fff5c6aa141ff8e9ca2d8c85740e4c7c707c6f720312703392b84a\\\" at \\\"/var/lib/docker/aufs/mnt/f41ff7a7a6fff5c6aa141ff8e9ca2d8c85740e4c7c707c6f720312703392b84a/usr/share/elasticsearch/config/elasticsearch.yml\\\" caused \\\"not a directory\\\"\""
: Are you trying to mount a directory onto a file (or vice-versa)? Check if the specified host path exists and is the expected type

below are some info about my docker:

$ docker version
Client:
 Version:      1.13.1
 API version:  1.26
 Go version:   go1.7.5
 Git commit:   092cba3
 Built:        Wed Feb  8 08:47:51 2017
 OS/Arch:      darwin/amd64

Server:
 Version:      1.13.1
 API version:  1.26 (minimum version 1.12)
 Go version:   go1.7.5
 Git commit:   092cba3
 Built:        Wed Feb  8 08:47:51 2017
 OS/Arch:      linux/amd64
 Experimental: true
$ docker info
Containers: 15
 Running: 0
 Paused: 0
 Stopped: 15
Images: 38
Server Version: 1.13.1
Storage Driver: aufs
 Root Dir: /var/lib/docker/aufs
 Backing Filesystem: extfs
 Dirs: 380
 Dirperm1 Supported: true
Logging Driver: json-file
Cgroup Driver: cgroupfs
Plugins:
 Volume: local
 Network: bridge host ipvlan macvlan null overlay
Swarm: inactive
Runtimes: runc
Default Runtime: runc
Init Binary: docker-init
containerd version: aa8187dbd3b7ad67d8e5e3a15115d3eef43a7ed1
runc version: 9df8b306d01f59d3a8029be411de015b7304dd8f
init version: 949e6fa
Security Options:
 seccomp
  Profile: default
Kernel Version: 4.9.8-moby
Operating System: Alpine Linux v3.5
OSType: linux
Architecture: x86_64
CPUs: 4
Total Memory: 1.952 GiB
Name: moby
ID: 247X:LGNT:FJ4M:U6XE:T47E:WXLQ:VFXY:D3Z2:MBPI:KMAL:32LQ:DDHF
Docker Root Dir: /var/lib/docker
Debug Mode (client): false
Debug Mode (server): true
 File Descriptors: 17
 Goroutines: 27
 System Time: 2017-02-22T19:00:56.756261436Z
 EventsListeners: 1
No Proxy: *.local, 169.254/16
Registry: https://index.docker.io/v1/
Experimental: true
Insecure Registries:
 127.0.0.0/8
Live Restore Enabled: false

@imarchuang your seems to be a different problem!

What are you trying to mount? Seems like a folder on your host doesnt exist.

Please provide your docker-compose file

I'm having the same issues. I was running a php-fpm and nginx container.
Rebooted my windows machine, and it couldn't find the files anymore i was trying to include on the php-fpm container.

NOTICE: PHP message: PHP Warning:  Unknown: failed to open stream: No such file or directory in Unknown on line 0
172.17.0.5 -  27/Feb/2017:14:06:05 +0000 "GET /index.php" 200
NOTICE: PHP message: PHP Fatal error:  Unknown: Failed opening required '/var/www/xxxx/public/index.php' (include_path='.:/usr/share/php') in Unknown on line 0
172.17.0.5 -  27/Feb/2017:14:06:06 +0000 "GET /index.php" 404
ERROR: Unable to open primary script: /var/www/xxxx/public/index.php (No such file or directory)

Then restarted the container and got:

Cannot start service loanstreet-php-fpm: oci runtime error: container_linux.go:247: starting container process caused "process_linux.go:359: container init caused \"rootfs_linux.go:54: mounting \\\"/C/Web/Apache/htdocs/sxxxxxx/php-fpm/php-ini-overrides.ini\\\" to rootfs \\\"/var/lib/docker/aufs/mnt/83e56fa30d7fae9156dc5842b62f1bc65cbbbcbfebabd96bb4d3513df53458bc\\\" at \\\"/var/lib/docker/aufs/mnt/83e56fa30d7fae9156dc5842b62f1bc65cbbbcbfebabd96bb4d3513df53458bc/etc/php/7.1/fpm/conf.d/99-overrides.ini\\\" caused \\\"not a directory\\\"\""

"volumes" binds directories... not files.

@imarchuang bind the "config" directory => elk/elasticsearch/config with /usr/share/elasticsearch/config

@chielsen bind "php-fpm" direcotry with /etc/php/7.1/fpm/conf.d directory

Hi Romain,

Thanks for the reply, and indeed it works... so there is no way if I would
like to mount a specific file only?

Best Regards
Marc Huang
Cell Phone: (+1) 416-856-2622

On 27 February 2017 at 09:41, Romain Dequidt notifications@github.com
wrote:

"volumes" binds directories... not files.

@imarchuang https://github.com/imarchuang bind the "config" directory
=> elk/elasticsearch/config with /usr/share/elasticsearch/config

@chielsen https://github.com/chielsen bind "php-fpm" direcotry with
/etc/php/7.1/fpm/conf.d directory


You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/docker/compose/issues/4039#issuecomment-282738779,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AHoqGkRXsN6lONNR52yXWSozxL3kawXqks5rguCugaJpZM4KZlqg
.

@romaindequidt That is weird since it always worked. I got this from https://phpdocker.io/generator
Mounting a file is also specified in here: https://docs.docker.com/engine/tutorials/dockervolumes/#mount-a-host-file-as-a-data-volume

I found a workaround for now, making the file readonly, adding ':ro' on the end of the line.

You either mount a specific file, or you mount a whole folder.
You cannot mount a single file into a folder!

As taken from the link provided by @chielsen you can do this:

docker run --rm -it -v ~/.bash_history:/root/.bash_history ubuntu /bin/bash

which maps the users local .bash_history file into the container with the specified filename.

I just caught this error after updating of docker without restarting docker daemon.

Step 9/13 : RUN /bin/ln -s /etc/nginx/sites-available/symfony.conf /etc/nginx/sites-enabled/symfony.conf
 ---> Running in ea68a8b4bf61
container_linux.go:247: starting container process caused "process_linux.go:334: running prestart hook 0 caused \"fork/exec /usr/bin/dockerd (deleted): no such file or directory\""
ERROR: Service 'nginx' failed to build: invalid header field value "oci runtime error: container_linux.go:247: starting container process caused \"process_linux.go:334: running prestart hook 0 caused \\\"fork/exec /usr/bin/dockerd (deleted): no such file or directory\\\"\"\n"

After restarting all works normal.

In my case, I've changed docker-compose.yml file.
from
- /usr/local/bin/docker:/usr/bin/docker
to
- /usr/bin/docker:/usr/bin/docker

It works fine.

I still occasionally have this error. I actually just bought a new pc and did a clean win 10 install and still have this issue. Only way to fix it is to reboot.
Is anybody looking into this?

@chielsen Seems like it may happen at least after Docker update. I solved this problem for me with restarting Docker daemon.

when i docker run , i get following error
Error response from daemon: invalid header field value "oci runtime error: container_linux.go:247: starting container process caused \"chdir to cwd (\\\"/data/env/tomcats/0\\\") set in config.json failed: no such file or directory\"\n" Error: failed to start containers: fd2e03516c08
and my dockerfile in following
`FROM minchangchen/openjdk:latest
MAINTAINER minchangchen
LABEL name="tomcat" license="MIT" build-date="20170223"

ENV VERSION 8.5.15
ENV TOMCAT_PATH /data/env/tomcats/0

RUN yum update -y && cd /data/softs && wget http://www-us.apache.org/dist/tomcat/tomcat-8/v$VERSION/bin/apache-tomcat-$VERSION.tar.gz && tar -zxf apache-tomcat-$VERSION.tar.gz && mkdir /data/env/tomcats && mv apache-tomcat-$VERSION $TOMCAT_PATH && rm -rf /data/softs/*

COPY catalina.sh $TOMCAT_PATH/bin/catalina.sh
COPY server.xml $TOMCAT_PATH/conf/server.xml
COPY context.xml $TOMCAT_PATH/conf/context.xml

RUN chmod +x $TOMCAT_PATH/bin/catalina.sh

WORKDIR $TOMCAT_PATH

CMD ["bin/catalina.sh", "run"]`

everybody help me !!! - . --

This is happening with docker-toolbox on windows 7 as well:

ERROR: for storage_startup  Cannot start service storage_startup: invalid header
 field value "oci runtime error: container_linux.go:247: 
starting container process caused \"exec: \\\"./startup.sh\\\":
 permission denied\"\n"

objectivePinta Try to restart your toolbox when you get this error. and restart your container,
if you still have the same error, just use the virtual box in docker toolbox and then return to the normal one and it should fix it.

Got this today.
Windows 10 Pro with the Docker App (native hyper-v) 17.03.1-ce-win5 (10743)
I've been running this particular container for months now without issue. Restarted laptop and the bug hasn't returned.

ERROR: for goconvey-dev  Cannot start service goconvey-dev: oci runtime error: container_linux.go:247: starting container process caused "process_linux.go:359: container init caused \"rootfs_linux.go:54: mounting \\\"/C/Users/xxx/workspace/go/src/github.com/xxx\\\" to rootfs \\\"/var/lib/docker/overlay2/c39c054c44d82f699180b40c19a5a626c74063f8c9defa0c2a2bf12dfdb7972d/merged\\\" at \\\"/go/src/github.com/xxx\\\" caused \\\"stat /C/Users/xxx/workspace/go/src/github.com/xxx: input/output error\\\"\""
Encountered errors while bringing up the project.

@veqryn the capital "C" in the path looks suspicious. I believe that by default the path is mounted into the boot2docker VM with lowercase drive letter - such as /c/Users/xxx/....

I know this isn't exactly the answer, but check the path in VM properties in VirtualBox.

Not using virtualbox, it is the "native" docker on windows 10 pro (hyper-v with MobyLinux or something)

This is still happening for me. I'm using VS 2017 15.2. New .net core webapi project unchanged. It run and returns output from values controller. However with docker enabled and running docker it fails



netcoreapp1.1.1
1.1.1
..docker-compose.dcproj













Error MSB4018 The "PrepareForLaunch" task failed unexpectedly.
Microsoft.DotNet.Docker.CommandLineClientException: Recreating dockercompose1799126456_webapplication1_1
ERROR: for webapplication1 Cannot start service webapplication1: oci runtime error: container_linux.go:247: starting container process caused "process_linux.go:359: container init caused \"rootfs_linux.go:54: mounting \\"/C/Users/ozi/clrdbg\\" to rootfs \\"/var/lib/docker/aufs/mnt/bcd36fde3d73f42c946097965ac1a8f140ed57736aa10c499bd837de25e47d1b\\" at \\"/clrdbg\\" caused \\"stat /C/Users/ozi/clrdbg: input/output error\\"\""
Encountered errors while bringing up the project..

For more troubleshooting information, go to http://aka.ms/DockerToolsTroubleshooting ---> Microsoft.DotNet.Docker.CommandLineClientException: Recreating dockercompose1799126456_webapplication1_1
ERROR: for webapplication1 Cannot start service webapplication1: oci runtime error: container_linux.go:247: starting container process caused "process_linux.go:359: container init caused \"rootfs_linux.go:54: mounting \\"/C/Users/ozi/clrdbg\\" to rootfs \\"/var/lib/docker/aufs/mnt/bcd36fde3d73f42c946097965ac1a8f140ed57736aa10c499bd837de25e47d1b\\" at \\"/clrdbg\\" caused \\"stat /C/Users/ozi/clrdbg: input/output error\\"\""
Encountered errors while bringing up the project.
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at Microsoft.DotNet.Docker.DockerComposeClient.d__18.MoveNext()
--- End of inner exception stack trace ---
at Microsoft.DotNet.Docker.DockerComposeClient.d__18.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at Microsoft.DotNet.Docker.DockerWorkspace.d__14.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at Microsoft.DotNet.Docker.BuildTasks.DockerBaseTask.Execute()
at Microsoft.Build.BackEnd.TaskExecutionHost.Microsoft.Build.BackEnd.ITaskExecutionHost.Execute()
at Microsoft.Build.BackEnd.TaskBuilder.d__26.MoveNext() docker-compose C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\MSBuild\Microsoft\VisualStudio\v15.0\Docker\Microsoft.VisualStudio.Docker.Compose.targets 192

On windows 10 and just encountered this bug. Going into Docker settings -> shared drives and then unselecting my drive, apply, and then re-selecting (apply) seems to have fixed it. Thanks @artem-gavrylenko

I had this error a very stupid thing:

I was doing this

COPY ./package.json /frontend

Insetead of this:

COPY ./package.json /frontend/

On Windows 10 I was encountering the same issue with Docker for Windows. This started happening and I couldn't figure out why until I realized that I changed my OS credentials earlier in the day! I went into Docker Settings --> shared drives and clicked 'Reset my credentials'. I was then asked for my new credentials and everything started up fine after that.

We have two different pipelines, both are being run on the same docker, but this happens only to one of them.... !!! any ideas?

My experience was that this is really just a poorly documented error condition. Issue (for me) was referencing a source file/dir in a VOLUME statement in my docker-compose file.

fixing that (by actually referring to existent file/dir) fixed the condition.

I'm on windows 7. This is in my docker-compose

  elasticsearch:
    image: elasticsearch:5
    restart: always
    environment:
      ES_JAVA_OPTS: "-Xms750m -Xmx750m"
    ports:
      - "9200:9200"
    volumes:
      - "./config/elasticsearch/elasticsearch.yml:/usr/share/elasticsearch/config/elasticsearch.yml"
      - "./config/elasticsearch/plugins:/usr/share/elasticsearch/plugins"

and I get the error

`$ docker-compose up
Removing mcclatchy_elasticsearch_1
mcclatchy_memcached_1 is up-to-date
mcclatchy_mailcatcher_1 is up-to-date
Recreating 0155df9beaaa_0155df9beaaa_mcclatchy_elasticsearch_1 ...
mcclatchy_mysql_1 is up-to-date
Recreating 0155df9beaaa_0155df9beaaa_mcclatchy_elasticsearch_1 ... error

ERROR: for 0155df9beaaa_0155df9beaaa_mcclatchy_elasticsearch_1 Cannot start service elasticsearch: oci runtime error: container_linux.go:265: starting container process caused "process_linux.go:368: container init caused \"rootfs_linux.go:57: mounting \\"/f/mcclatchy/config/elasticsearch/elasticse
arch.yml\\" to rootfs \\"/mnt/sda1/var/lib/docker/aufs/mnt/cc17c689b4bb610b0e65c9dde943c9443aa9baac298106ff21fcb8b773f4263f\\" at \\"/mnt/sda1/var/lib/docker/aufs/mnt/cc17c689b4bb610b0e65c9dde943c9443aa9baac298106ff21fcb8b773f4263f/usr/share/elasticsearch/config/elasticsearch.yml\\" caused \\"
not a directory\\"\""
: Are you trying to mount a directory onto a file (or vice-versa)? Check if the specified host path exists and is the expected type

ERROR: for elasticsearch Cannot start service elasticsearch: oci runtime error: container_linux.go:265: starting container process caused "process_linux.go:368: container init caused \"rootfs_linux.go:57: mounting \\"/f/mcclatchy/config/elasticsearch/elasticsearch.yml\\" to rootfs \\"/mnt/sda1/v
ar/lib/docker/aufs/mnt/cc17c689b4bb610b0e65c9dde943c9443aa9baac298106ff21fcb8b773f4263f\\" at \\"/mnt/sda1/var/lib/docker/aufs/mnt/cc17c689b4bb610b0e65c9dde943c9443aa9baac298106ff21fcb8b773f4263f/usr/share/elasticsearch/config/elasticsearch.yml\\" caused \\"not a directory\\"\""
: Are you trying to mount a directory onto a file (or vice-versa)? Check if the specified host path exists and is the expected type`

Dss@Dss MINGW64 /c/zenbot
$ docker-compose up -d
Removing zenbot_server_1
Recreating zenbot_mongodb-data_1 ...
Recreating zenbot_mongodb-data_1
WARNING: Service "mongodb-data" is using volume "/data/db" from the previous con
tainer. Host mapping "/c/zenbot/data/db" has no effect. Remove the existing cont
Recreating zenbot_mongodb-data_1 ... done
Recreating zenbot_mongodb_1 ...
Recreating zenbot_mongodb_1 ... done
Recreating 61e6ca9ef371_61e6ca9ef371_61e6ca9ef371_61e6ca9ef371_zenbot_server_1 .
..
Recreating 61e6ca9ef371_61e6ca9ef371_61e6ca9ef371_61e6ca9ef371_zenbot_server_1 .
.. error

ERROR: for 61e6ca9ef371_61e6ca9ef371_61e6ca9ef371_61e6ca9ef371_zenbot_server_1
Cannot start service server: oci runtime error: container_linux.go:265: starting
container process caused "process_linux.go:368: container init caused \"rootfs_
linux.go:57: mounting \\"/c/zenbot/conf.js\\" to rootfs \\"/mnt/sda1/var/lib/
docker/aufs/mnt/77d9fd5e67b17f037fada3c80378dded067771196c9dd082aafaa975a3cc0a44
\\" at \\"/mnt/sda1/var/lib/docker/aufs/mnt/77d9fd5e67b17f037fada3c80378dded06
7771196c9dd082aafaa975a3cc0a44/app/conf.js\\" caused \\"not a directory\\"\""

: Are you trying to mount a directory onto a file (or vice-versa)? Check if the
specified host path exists and is the expected type

ERROR: for server Cannot start service server: oci runtime error: container_lin
ux.go:265: starting container process caused "process_linux.go:368: container in
it caused \"rootfs_linux.go:57: mounting \\"/c/zenbot/conf.js\\" to rootfs \\
"/mnt/sda1/var/lib/docker/aufs/mnt/77d9fd5e67b17f037fada3c80378dded067771196c9dd
082aafaa975a3cc0a44\\" at \\"/mnt/sda1/var/lib/docker/aufs/mnt/77d9fd5e67b17f0
37fada3c80378dded067771196c9dd082aafaa975a3cc0a44/app/conf.js\\" caused \\"not
a directory\\"\""
: Are you trying to mount a directory onto a file (or vice-versa)? Check if the
specified host path exists and is the expected type
ERROR: Encountered errors while bringing up the project.

$ docker version
Client:
Version: 17.07.0-ce
API version: 1.31
Go version: go1.8.3
Git commit: 8784753
Built: Tue Aug 29 17:41:05 2017
OS/Arch: windows/amd64

Server:
Version: 17.09.0-ce
API version: 1.32 (minimum version 1.12)
Go version: go1.8.3
Git commit: afdb6d4
Built: Tue Sep 26 22:45:38 2017
OS/Arch: linux/amd64
Experimental: false

$ docker info
Containers: 7
Running: 2
Paused: 0
Stopped: 5
Images: 10
Server Version: 17.09.0-ce
Storage Driver: aufs
Root Dir: /mnt/sda1/var/lib/docker/aufs
Backing Filesystem: extfs
Dirs: 37
Dirperm1 Supported: true
Logging Driver: json-file
Cgroup Driver: cgroupfs
Plugins:
Volume: local
Network: bridge host macvlan null overlay
Log: awslogs fluentd gcplogs gelf journald json-file logentries splunk syslog
Swarm: inactive
Runtimes: runc
Default Runtime: runc
Init Binary: docker-init
containerd version: 06b9cb35161009dcb7123345749fef02f7cea8e0
runc version: 3f2f8b84a77f73d38244dd690525642a72156c64
init version: 949e6fa
Security Options:
seccomp
Profile: default
Kernel Version: 4.4.89-boot2docker
Operating System: Boot2Docker 17.09.0-ce (TCL 7.2); HEAD : 06d5c35 - Wed Sep 27
23:22:43 UTC 2017
OSType: linux
Architecture: x86_64
CPUs: 1
Total Memory: 995.8MiB
Name: default
ID: MBC4:V75F:KP5Q:TIC3:MH65:GXPO:4RY7:3RWU:355J:VR54:V365:JBLD
Docker Root Dir: /mnt/sda1/var/lib/docker
Debug Mode (client): false
Debug Mode (server): true
File Descriptors: 30
Goroutines: 40
System Time: 2017-10-13T20:10:22.76759278Z
EventsListeners: 0
Registry: https://index.docker.io/v1/
Labels:
provider=virtualbox
Experimental: false
Insecure Registries:
127.0.0.0/8
Live Restore Enabled: false

Hi.
Im having similar problem. Newb here.
I tried to install this image.

It did fit well. But when i try to run,

 $ sudo docker run -ti --rm -v ~/Downloads:/Downloads bwits/pdf2htmlex --zoom 1.3 1.pdf

it throws,

docker: Error response from daemon: oci runtime error: container_linux.go:265: starting container process caused "exec: \"--zoom\": executable file not found in $PATH".

Already tried sudo didn't seem to work.

Information regarding docker install

 $ sudo docker version
Client:
 Version:      17.09.0-ce
 API version:  1.32
 Go version:   go1.8.3
 Git commit:   afdb6d4
 Built:        Tue Sep 26 22:42:18 2017
 OS/Arch:      linux/amd64

Server:
 Version:      17.09.0-ce
 API version:  1.32 (minimum version 1.12)
 Go version:   go1.8.3
 Git commit:   afdb6d4
 Built:        Tue Sep 26 22:40:56 2017
 OS/Arch:      linux/amd64
 Experimental: false

docker info

 $ sudo docker info
Containers: 1
 Running: 0
 Paused: 0
 Stopped: 1
Images: 2
Server Version: 17.09.0-ce
Storage Driver: overlay2
 Backing Filesystem: extfs
 Supports d_type: true
 Native Overlay Diff: true
Logging Driver: json-file
Cgroup Driver: cgroupfs
Plugins:
 Volume: local
 Network: bridge host macvlan null overlay
 Log: awslogs fluentd gcplogs gelf journald json-file logentries splunk syslog
Swarm: inactive
Runtimes: runc
Default Runtime: runc
Init Binary: docker-init
containerd version: 06b9cb35161009dcb7123345749fef02f7cea8e0
runc version: 3f2f8b84a77f73d38244dd690525642a72156c64
init version: 949e6fa
Security Options:
 apparmor
 seccomp
  Profile: default
Kernel Version: 4.8.0-59-generic
Operating System: Ubuntu 16.10
OSType: linux
Architecture: x86_64
CPUs: 4
Total Memory: 7.691GiB
Name: greyhound
ID: ZNTB:2MIN:NYGC:GQKD:DWWM:K7CX:ELML:KIX7:WYFT:VJQX:4POJ:POPL
Docker Root Dir: /var/lib/docker
Debug Mode (client): false
Debug Mode (server): false
Registry: https://index.docker.io/v1/
Experimental: false
Insecure Registries:
 127.0.0.0/8
Live Restore Enabled: false

WARNING: No swap limit support

A reboot worked for me :-/

Same here, reboot didn't help:(
Host - ubuntu.
Everything works fine, but not when I installed a gitlab-runner on it and trying to execute docker-compose in it.
Have anybody figured it out already?

Fixed by editing mount folders in Kitematic. They first appeared repeated (Docker folder: /var/www/html/something, Local folder: /var/www/html/something). After editing, they appear garbled (Local folder: \d\srvT:est\something instead of \d\srv\test\something), but they work. In the error message, the unit drive is in caps (stat /D/srv/test/something: input/output error).

This on my PC running Windows 10 with Hyper-V. I don't intend to install Kitematic (+X) in my server tho, so this is more of a temporal workaround...

I also had this error on MacOS, resetting the docker fixed it somehow.

If you're using MacOS, you should make your host's docker-entrypoint.sh executable too, not just on your Dockerfile. Got this from a tip, https://github.com/composer/docker/issues/7

@obfusticatedcode this fixed my problem! I was tearing my head out wondering why this project worked great on my Windows workstation but was crapping out on my Macbook Pro. Thanks!

In my case , yum install libseccomp libseccomp-devel.

I was using alpine-based images and changed /bin/bash to /bin/sh and it worked ok :-)

Want to thank @obfusticatedcode ! Problem solved. In my case, the project worked on Windows but failed upon running docker-compose up on Debian.

Faced and solved the same issue. For me, it was due to the service level volumes declaration in the docker-compose.yml file.

services:
  web:
    volumes:
      - ./app/:/app 

This was overriding anything I copied to /app mount point in the Dockerfile.
Commenting out the volumes declaration worked.

I could make it work on Windows 10 after running the command prompt as an administrator.

issue for me was that I recently changed windows password, Going into Docker settings -> shared drives, un-selecting my drive, apply, and then re-selecting (apply) fixed it.

@sajadghawami I wanted to thank you, personally, for saving me from this hell. Your comment was invaluable!! Thank you <3

On windows 10 and just encountered this bug. Going into Docker settings -> shared drives and then unselecting my drive, apply, and then re-selecting (apply) seems to have fixed it. Thanks @artem-gavrylenko

This was perfect. Why do things like this happen?? Does anyone know?

Yo can look for /docker-entrypoint-initdb.d in the volumes section if the sql file don't exist will return this error.

```
mysql:
image: percona:5.6
ports:
- "3306:3306"
volumes:
- ./sql/bk.sql:/docker-entrypoint-initdb.d/bk.sql # bk.sql don't exist, comment the line or put the file there
- ./docker/mysql:/var/lib/mysql

Same error

PS D:\projects\bp> docker info
Containers: 5
 Running: 2
 Paused: 0
 Stopped: 3
Images: 3
Server Version: 18.09.0
Storage Driver: overlay2
 Backing Filesystem: extfs
 Supports d_type: true
 Native Overlay Diff: true
Logging Driver: json-file
Cgroup Driver: cgroupfs
Plugins:
 Volume: local
 Network: bridge host macvlan null overlay
 Log: awslogs fluentd gcplogs gelf journald json-file local logentries splunk syslog
Swarm: inactive
Runtimes: runc
Default Runtime: runc
Init Binary: docker-init
containerd version: 468a545b9edcd5932818eb9de8e72413e616e86e
runc version: 69663f0bd4b60df09991c08812a60108003fa340
init version: fec3683
Security Options:
 seccomp
  Profile: default
Kernel Version: 4.14.79-boot2docker
Operating System: Boot2Docker 18.09.0 (TCL 8.2.1)
OSType: linux
Architecture: x86_64
CPUs: 1
Total Memory: 989.4MiB
Name: vm
ID: JWYK:OSFS:XCAW:W2MF:FZZT:BBTD:EKCN:WH55:4YGD:V634:O37T:7JJL
Docker Root Dir: /mnt/sda1/var/lib/docker
Debug Mode (client): false
Debug Mode (server): false
Registry: https://index.docker.io/v1/
Labels:
 provider=virtualbox
Experimental: false
Insecure Registries:
 127.0.0.0/8
Live Restore Enabled: false
PS D:\projects\bp> docker version                   
Client:                                             
 Version:           18.06.1-ce                      
 API version:       1.38                            
 Go version:        go1.10.3                        
 Git commit:        e68fc7a                         
 Built:             Tue Aug 21 17:21:34 2018        
 OS/Arch:           windows/amd64                   
 Experimental:      false                           

Server: Docker Engine - Community                   
 Engine:                                            
  Version:          18.09.0                         
  API version:      1.39 (minimum version 1.12)     
  Go version:       go1.10.4                        
  Git commit:       4d60db4                         
  Built:            Wed Nov  7 00:52:55 2018        
  OS/Arch:          linux/amd64                     
  Experimental:     false                           



md5-745dead46e2bec9b61b4b9b2cb9a0822




version: '3.4'
services:
    web:
        image: nginx:alpine
        container_name: ${NGINX_HOST}
        ports:
        - "80:80"
        - "443:443"
        env_file:
        - ".env"
        environment:
        - NGINX_HOST=${NGINX_HOST}
        #command: /bin/sh -c "envsubst < /etc/nginx/conf.d/default.template > /etc/nginx/conf.d/default.conf" && nginx -g 'daemon off;'
        restart: always
        depends_on:
        - php
        - mysqldb
        logging:
          driver: json-file
          options:
            max-size: "200k"
            max-file: "10"
        volumes:
        - ./etc/nginx/default.conf:/etc/nginx/conf.d/default.conf
        - ./etc/nginx/default.template:/etc/nginx/conf.d/default.template
        - ./etc/ssl:/etc/ssl
        - .:/var/www/html
    php:
        image: nanoninja/php-fpm:${PHP_VERSION}
        restart: always
        volumes:
        - ./etc/php/php.ini:/usr/local/etc/php/conf.d/php.ini
        - .:/var/www/html
        links:
        - mysqldb
    mysqldb:
        image: mysql:${MYSQL_VERSION}
        container_name: ${MYSQL_HOST}
        restart: always
        env_file:
        - ".env"
        environment:
        - MYSQL_DATABASE=${MYSQL_DATABASE}
        - MYSQL_ROOT_PASSWORD=${MYSQL_ROOT_PASSWORD}
        - MYSQL_USER=${MYSQL_USER}
        - MYSQL_PASSWORD=${MYSQL_PASSWORD}
        privileged: true
        ports:
        - "8989:3306"
        volumes:
        - ../db:/var/lib/mysql
        #- ./etc/mysql/my.cnf:/etc/mysql/my.cnf



md5-82ff5be8d74eb1c16e9ad10ccb0c323f



PS D:\projects\bp> docker-compose up web
Removing bp.int
mysql is up-to-date
bp_php_1 is up-to-date
Starting 0ef479e51d62_bp.int ... error

ERROR: for 0ef479e51d62_bp.int  Cannot start service web: OCI runtime create failed: container_linux.go:348: starting container process caused "process_linux.go:402: container init caused \"rootfs_linux.go:58: mounting \\\"/d/projects/bp/etc/nginx/default.conf\\\" to rootfs \\\"/mnt/sda1/var/lib/docker/overlay2/a5cad006b2a324c1026e2d98a466e9ed454971961d166bfb4f7b5f5ec82605b3/merged\\\" at \\\"/mnt/sda1/var/lib/docker/overlay2/a5cad006b2a324c1026e2d98a466e9ed454971961d166bfb4f7b5f5ec82605b3/merged/etc/nginx/conf.d/default.conf\\\" caused \\\"not a directory\\\"\"": unknown: Are you trying to mount a directory onto a file (or vice-versa)? Check if the specified host path exists and is the expected type

ERROR: for web  Cannot start service web: OCI runtime create failed: container_linux.go:348: starting container process caused "process_linux.go:402: container init caused \"rootfs_linux.go:58: mounting \\\"/d/projects/bp/etc/nginx/default.conf\\\" to rootfs \\\"/mnt/sda1/var/lib/docker/overlay2/a5cad006b2a324c1026e2d98a466e9ed454971961d166bfb4f7b5f5ec82605b3/merged\\\" at \\\"/mnt/sda1/var/lib/docker/overlay2/a5cad006b2a324c1026e2d98a466e9ed454971961d166bfb4f7b5f5ec82605b3/merged/etc/nginx/conf.d/default.conf\\\" caused \\\"not a directory\\\"\"": unknown: Are you trying to mount a directory onto a file (or vice-versa)? Check if the specified host path exists and is the expected type
ERROR: Encountered errors while bringing up the project.

A teammate just ran into this issue. @sajadghawami's solution worked for us.

One note about the situation that may have caused this - she changed her Windows password the day before. While I don't have the personal resources to validate this behavior, I think it would be easy to test that.

I've been pulling my hair out for some time now as I cannot get reaction to install following the instructions at https://docs.reactioncommerce.com/docs/next/installation-reaction-platform.

I'm running Windows 7 64-bit Pro with node.js 8.12.0 and rather than use the latest installer which is only compatible with Windows 10, I have sucessfully installed Many steps complete successfully Docker Toolbox which contains Docker Engine as well as Oracle VM. All good so far.

I've configured GitHub with SSH and sucessfully cloned the reaction project using git.

When I run the make command, many steps completed successfully, but it keeps failing at step 40/41 with the below error. (Note: To create the two networks auth.reaction.localhost and api.reaction.localhost I had to turn off Windows Firewall and run the docker network create commands manually.)

Step 41/41 : CMD ["yarn", "start"]
 ---> Running in 237f6ba37bc1
Removing intermediate container 237f6ba37bc1
 ---> a3936c5854f2

Successfully built a3936c5854f2
Successfully tagged reactionnextstarterkit_web:latest
Running post-build hook script for reaction-next-starterkit.
reaction-next-starterkit post-build script invoked.
Recreating reactionnextstarterkit_web_1 ... error

ERROR: for reactionnextstarterkit_web_1  Cannot start service web: OCI runtime create failed: container_linux.go:348: starting container process caused "exec: \"/usr/local/src/reaction-app/bin/start\": stat /usr/local/src/reaction-app/bin/start: no such file or directory": unknown

ERROR: for web  Cannot start service web: OCI runtime create failed: container_linux.go:348: starting container process caused "exec: \"/usr/local/src/reaction-app/bin/start\": stat /usr/local/src/reaction-app/bin/start: no such file or directory": unknown
ERROR: Encountered errors while bringing up the project.
make: *** [start-reaction-next-starterkit] Error 1

Any help or pointers would be HUGELY appreciated!

If anyone is interested I managed to get install to complete on Windows by copying the reaction-platform folder under the User directory... (I think it was some kind of permissions issue perhaps?)

Anyway I still haven't managed to get it to run by following the developer instructions outlined and simply running the 'make' command in the reaction-platform directory.

So far instructions for windows developers have been VERY POOR - a huge shame IMO

issue for me was that I recently changed windows password, Going into Docker settings -> shared drives, un-selecting my drive, apply, and then re-selecting (apply) fixed it.

thank you SO MUCH, @danielcgithub. saved my day.

For what it is worth: sudo docker container prune fixed the issue for me.

click on _icon tray Docker > Settings... > Shared Drivers_ and select checkbox _Shared:_ C and D
Maybe it`s help you!

Tu é pica mesmo

click on _icon tray Docker > Settings... > Shared Drivers_ and select checkbox _Shared:_ C and D
Maybe it`s help you!

A teammate just ran into this issue. @sajadghawami's solution worked for us.

One note about the situation that may have caused this - she changed her Windows password the day before. While I don't have the personal resources to validate this behavior, I think it would be easy to test that.

Just to add in to the other comments here by several people, this happened to me recently and I can confirm. I had recently changed the password, computer was restarted and docker-compose would not bring up the containers. Unchecking and rechecking the Shared Drive, followed by entering the updated password got everything up and running.

It fails when setting entrypoint as per documentation
~~
version: '3.2'
services:
my_service:
image: my_image
volumes:
- /home/app/config:/root
entrypoint:
- ls /root
~
~

It works when changing entrypoint to
~~
entrypoint:
ls /root
~
~
without hiphen

I had this happen when trying to run a docker through docker toolbox in windows on WSL. For what it's worth to anyone here, my problem was solved by making sure that i was accessing things through the windows rather than the linux file-system:

docker run -it --rm --name lispy -v "$PWD":/Lis_Py python:3 python Lis_Py/lis.py || docker start -ia lispy

# on WSL with docker running in windows, $PWD will not work and must be set to the same as $PWD from docker quick-start,
# viz. docker run -it --rm --name lispy -v /c/Users/firez/Documents/Development/lis.py:/Lis_Py python:3 python Lis_Py/lis.py || docker start -ia lispy

what happen

I face the "OCI runtime create failed" error too.
here is my command docker-compose up -d

how I solved

I login server by ssh -A, and then, error occur.
I logout and login by ssh without params, everything right.

log

ERROR: for my_logstash  Cannot start service logstash: OCI runtime create failed: container_linux.go:344: starting contain
er process caused "process_linux.go:297: getting the final child's pid from pipe caused \"EOF\"": unknown

ERROR: for logstash  Cannot start service logstash: OCI runtime create failed: container_linux.go:344: starting container proc
ess caused "process_linux.go:297: getting the final child's pid from pipe caused \"EOF\"": unknown
ERROR: Encountered errors while bringing up the project.

I got the same error when I tried a not provided volume in the image.
I mean, in docker-compose.yml, this works

  • "C:/tomcat/logs:/usr/local/tomcat/logs"
    and this don't

    • "C:/tomcat:/usr/local/tomcat"

I'm seeing this issue intermittently on my production Ubuntu 18.04 server when deploying through Azure Pipelines. Restarting Docker and/or restarting the server sometimes fixes it. It seems to be a rather vague error message with a lot of different root causes...

Log | Source

Another issue can be when you bind a volume attached to the local directory and your entry point is located it the directory that was replaced in the container. Thus, docker tries to execute the entry point and doesn't find it or gets a permissions denial.

Today I had this issue too. What I did yesterday, just changed my Windows user password. Today when I tried to start my container faced with this error message.

How I solved? Reset drive credentials in settings. Does Docker Desktop stores my password when I give access to my drives 🤷‍♂ ?

Iam also getting a similar but little different, Please help

docker-compose up
Starting wapdocker_wordpress_1 ... error

ERROR: for wapdocker_wordpress_1 Cannot start service wordpress: b'OCI runtime create failed: container_linux.go:345: starting container process caused "exec: \"/bin/sh\": stat /bin/sh: no such file or directory": unknown'

ERROR: for wordpress Cannot start service wordpress: b'OCI runtime create failed: container_linux.go:345: starting container process caused "exec: \"/bin/sh\": stat /bin/sh: no such file or directory": unknown'
ERROR: Encountered errors while bringing up the project.

Pretty easy to fix, in my case I just needed to save the files used by docker with LF ending line instead of CRLF ending line, you can use Vscode to do that and you can also configure it to save automatically as LF using editorconfig extension.

Just wanted to weigh in on this error. I had it and I solved it.

In my case I was using Proxmox VE 6.0 and a system container (CT) running CentOS. What I was trying to achieve, was to run a regular (micro) container within that instance. And I got the error message. Checked permissions - they were ok. Checked selinux - it wasn't activated. Then it dawned on me: Nested virtualization.

Turns out I hadn't enabled nested virtualization in Proxmox VE for the system container running CentOS. I stopped it, enabled nested virtualization and voila, now I could run standard (micro) containers within it.

Hope it helps.

For what it is worth: sudo docker container prune fixed the issue for me.

Worked for me, thank you! :D

This answer worked for me: https://github.com/docker/compose/issues/4039#issuecomment-261353666 thanks @artem-gavrylenko

https://github.com/docker/compose/issues/4039#issuecomment-262424900

I've noticed having a CMD line in a dockerfile and a -command parameter in a docker-compose file will also trigger this error.

I ran into this today with Docker 19.03.4 running with Docker for Mac and ☝️ fixed the issue for me. I removed command: npm start from my docker-compose.yml since my Dockerfile called CMD npm start. Everything seems to work as expected now.

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

chmod +x docker-entrypoint.sh

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

It helped me. Thank you.

I'm having a similar problem. My Error message is this:
ERROR: for logstash Cannot start service logstash: OCI runtime create failed: container_linux.go:346: starting container process caused "process_linux.go:449: container init caused "rootfs_linux.go:58: mounting \"/c/users/revature/documents/revature/William's Code/elasticapmdocker/logstash/logstash.yml\" to rootfs \"/mnt/sda1/var/lib/docker/overlay2/baa8081d216619bdc31c46a0b97b6b73ef1af2005b792f1adb5c3df974e39f57/merged\" at \"/mnt/sda1/var/lib/docker/overlay2/baa8081d216619bdc31c46a0b97b6b73ef1af2005b792f1adb5c3df974e39f57/merged/usr/share/logstash/config/logstash.yml\" caused \"not a directory\""":

According to my error message, something might be wrong with my logstash.yml file and my apm-server.yml file

So my logstash.yml file looks like this:
pipeline:
batch:
delay: 50
size: 125
xpack.monitoring.enabled: true

And my apm-server.yml looks like this:
apm-server:
host: "0.0.0.0:8200"
setup.dashboards.enabled: true
rum:
enabled: true
allow_origins: ['http://localhost:8080']
kibana:
enabled: true
host: "localhost:5601"
logging.level: info
logging.to_files: true
logging.files:
path: CHANGE_ME
name: DemoWebApplication
keepfiles: 7
permissions: 0644
logging.metrics:
enabled: true
output.elasticsearch:
index: "apm-server-%{+yyyy.MM.dd}"
hosts: ["localhost:9200"]
setup.template.name: "apm-server"
setup.template.pattern: "apm-server-*"

$ docker-compose up --build
Building app
Step 1/10 : FROM ruby:2.6-slim
---> cd9eb8fc5abd
Step 2/10 : RUN apt-get update -qq && apt-get install -y build-essential cmake git tzdata libpq-dev ruby-dev curl
---> Using cache
---> dae7cef58b65
Step 3/10 : RUN curl -sL https://deb.nodesource.com/setup_11.x | bash - && apt-get install -y nodejs
---> Using cache
---> 68bdae8e1191
Step 4/10 : RUN curl -sS https://dl.yarnpkg.com/debian/pubkey.gpg | apt-key add - && echo "deb https://dl.yarnpkg.com/debian/ stable main" | tee /etc/apt/sources.list.d/yarn.list && apt-get update && apt-get install -y yarn
---> Using cache
---> 8ae18681c5c2
Step 5/10 : RUN apt-get clean && rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*
---> Using cache
---> e7fece4b0095
Step 6/10 : RUN mkdir /app
---> Using cache
---> f59bc64ba38c
Step 7/10 : WORKDIR /app
---> Using cache
---> 0e280a5c2986
Step 8/10 : RUN gem install bundler -v 1.17.3
---> Using cache
---> 3cd92734be84
Step 9/10 : ENTRYPOINT ["./docker-entrypoint.sh"]
---> Using cache
---> 0071a71c1342
Step 10/10 : CMD ["bash"]
---> Using cache
---> a069f4950175
Successfully built a069f4950175
Successfully tagged ifme-master_app:latest
ifme-master_db_1 is up-to-date
Starting ifme-master_app_1 ... error
ERROR: for ifme-master_app_1 Cannot start service app: OCI runtime create failed: container_linux.go:346: starting container process caused "exec: "./docker-entrypoint.sh": stat ./docker-entrypoint.sh: no such file or directory": unknown

ERROR: for app Cannot start service app: OCI runtime create failed: container_linux.go:346: starting container process caused "exec: "./docker-entrypoint.sh": stat ./docker-entrypoint.sh: no such file or directory": unknown
ERROR: Encountered errors while bringing up the project.

I am getting this error while running command docker-compose up --build
though I have docker-entrypoint.sh

This may be caused by a password change.
Right click your docker icon
-> settings
-> Shared drives
-> re-select the workplace and system will require you enter the password again.

I am getting this error too, and sudo fixed it. However, there should be an alternative solution to this issue.

Instead of running as sudo simply run the command
chmod a+x /path/to/your/script.sh
to give permission to execute. This is much better than using sudo each time.

I am getting this error too, and sudo fixed it. However, there should be an alternative solution to this issue.

Instead of running as sudo simply run the command
chmod a+x /path/to/your/script.sh
to give permission to execute. This is much better than using sudo each time.

Which script you referring to? @motoxnate

@simanto604newscred the script I am referring to is the shell script used to bring up the rest of the project. In the original post, this would be the last line in the dockerfile which is:
CMD ["script/docker-entrypoint.sh"]
The script here is located at script/docker-entrypoint.sh

You only have to change the script permissions with chmod a+x <script> once and will no longer have to use sudo.

I am so sorry to add to this issue after it has been opened:

But I found a way around this. Simply rebuild the image by running:

docker-compose build

And then start a container using the newly built image:

docker-compose up

That's all.

I hope this helps

I was having a similar issue and none of the ways described here helped.
Later I noticed I had been running all comands from within a python virutal environment.
I had thought that made no difference because earlier today all build were going fine but later today not a single one went through event after pruning, restarting docker service, etc.
After I deactivated the virtual environment it all started woring correctly.
Leaving this here so that it might help someone else.

Was this page helpful?
0 / 5 - 0 ratings