Reputation: 655
Set up is on a Ubuntu 18.10 x64
Trying to set up a set up a Laravel, Nginx, and MySQL droplet with Docker Compose, with this tutorial docker tutorial and I get all the way to step 8 in the tutorial where it asks me to run this command
$ docker-compose exec app nano .env
and it gives me an error of
OCI runtime exec failed: exec failed: container_linux.go:348: starting container process caused "exec: \"nano\": executable file not found in $PATH": unknown
I have spent the better half of a day looking on line for any kind of help or clues on what i could have done wrong. any info I can give you please let me know.
Thank you in advance!
Upvotes: 4
Views: 2836
Reputation: 1514
you can go inside container with specific user and this case you must have root :
docker exec --user="root" -it <container_name> /bin/bash
then :
apt-get install nano
Upvotes: 5
Reputation: 839
Well... This error throws because there is no 'nano' editor installed in this container. If you're familiar with vim you can use it like this:
docker-compose exec app vim .env
You also can enter to the container's shell and then install nano to use it like that:
docker-compose exec app /bin/sh
and then in container install nano editor. Installation command will depends on the OS. For example, if container is based on ubuntu youll need to type:
apt-get install nano
of if it's based on alpine-linux:
apk add nano
and so on... You can google it easily ;) You can check which OS it is using next command:
lsb_release -a
Hope it helps ya
Upvotes: 9