-
Notifications
You must be signed in to change notification settings - Fork 5.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Error when trying to run docker-compose up. "oci runtime error: container_linux.go:247..." #4039
Comments
I've managed to fix it. I had wrong permissions and needed to run |
I am getting this error too, and |
@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 |
I'm getting a similar error and unfortunately sudo doesn't fix this one.
|
I had similar issue with my images and found this thread. In your case, please make sure that app.conf is an existing file. This will mount your local app.conf inside of the docker container. I hope it will help you. |
click on icon tray Docker > Settings... > Shared Drivers and select checkbox Shared: C and D |
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: This is due to a line in docker-compose.yml trying to point nginx's configuration back to the local filesystem:
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. |
dockerfile-new is still separated for reference added memcached again and necessary links added restart:always to all containers still problems when trying to run a bash inside a container (e.g. for running collectstatic): docker/compose#4039
you gotta make the docker-entrypoint.sh an executable before building the image:
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:
fails while:
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!
below are some info about my docker:
|
@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.
Then restarted the container and got:
|
"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 ***@***.***> 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
<#4039 (comment)>,
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 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. As taken from the link provided by @chielsen you can do this:
which maps the users local |
I just caught this error after updating of docker without restarting docker daemon.
After restarting all works normal. |
In my case, I've changed docker-compose.yml file. 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. |
@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 ENV VERSION 8.5.15 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 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:
|
objectivePinta Try to restart your toolbox when you get this error. and restart your container, |
Got this today.
|
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 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' |
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. |
Worked for me, thank you! :D |
This answer worked for me: #4039 (comment) thanks @artem-gavrylenko |
I ran into this today with Docker 19.03.4 running with Docker for Mac and ☝️ fixed the issue for me. I removed |
It helped me. Thank you. |
I'm having a similar problem. My Error message is this: 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: And my apm-server.yml looks like this: |
$ docker-compose up --build 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 I am getting this error while running command docker-compose up --build |
This may be caused by a password change. |
Instead of running as sudo simply run the command |
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: You only have to change the script permissions with |
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:
And then start a container using the newly built image:
That's all. I hope this helps |
I was having a similar issue and none of the ways described here helped. |
my solution was to avoid using file attaching from docker-compose to the containers but pass any files/folders to the dockerfile image that the container will use and that's it |
I had a similar error today. |
In Dockerfile
Docker build command
Adding these lines fixed the issue |
Removing the container solved the issue. Not sure if it will happen again after restart. (macOS Docker 2.2.04) |
I had the same issue when I used the entrypoint in docker-compose file
Then I moved it to the dockerfile and in dockerfile I used
|
I solved my issue with this solution. |
Worked for me as well |
sudo docker container prune worked for me!! |
Recent |
When trying to launch a built container with
docker-compose up
I'm getting an error: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 usedocker 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
:Dockerfile
script/docker-entrypoint.sh
docker-compose -v
:docker-compose version 1.8.1, build 878cff1
docker version
:docker info
:The text was updated successfully, but these errors were encountered: