I am working on Ubuntu Mint 17.2 64-bit and installed Docker using installation guide.
Getting problem while docker-compose up
.
When fire command it shows me error like :
data is up-to-date
db is up-to-date
Starting web
ERROR: for web Cannot start service web: oci runtime error: exec: "./entrypoint.sh": stat ./entrypoint.sh: no such file or directory
ERROR: Encountered errors while bringing up the project.
Here version info:
docker --version
Docker version 1.6.2
docker-compose --version
docker-compose version 1.8.0
docker-machine --version
docker-machine version 0.7.0
docker-compose.yml
look like
version: '2'
services:
nginx:
restart: always
container_name: nginx
build: ./nginx
ports:
- "80:80"
volumes_from:
- web
links:
- web:web
web:
restart: always
container_name: web
build: .
expose:
- "8000"
env_file: .env
volumes:
- ./web:/web
links:
- db:db
depends_on:
- db
command: ./entrypoint.sh
...
I think in web entrypoint.sh
was not found,
For more info also give permission in Dockerfile
file,In it RUN chmod +x /web/entrypoint.sh
I am not sure how to solve this issue.
Edit:
I am connect docker-machine with ssh and find web dir empty.
If you want to force Compose to stop and recreate all containers, use the --force-recreate flag. If the process encounters an error, the exit code for this command is 1 . If the process is interrupted using SIGINT (ctrl + C) or SIGTERM , the containers are stopped, and the exit code is 0 .
You can still find Docker Compose V1 in the `master` branch. Compose V1 is marked as deprecated, and we'll begin patching only high-severity vulnerabilities or fixing critical bugs until the next milestone. Developers can continue to alias docker-compose to use docker compose.
The key difference between docker run versus docker-compose is that docker run is entirely command line based, while docker-compose reads configuration data from a YAML file. The second major difference is that docker run can only start one container at a time, while docker-compose will configure and run multiple.
Both the Dockerfile and docker-compose are important resources in the development and deployment of cloud-native applications. But knowing the difference between docker-compose and the Dockerfile is important. The Dockerfile is used to build images, while docker-compose helps you run them as containers.
docker-machine
only creates shared folders for /home
. If the project is not under the home directory then you wont be able to use volumes.
You can either add another shared folder,or move the project. Since you are on linux you don't actually need to use docker-machine
, you could just use docker directly on the host.
run command docker rm -f somecontainer
and then restart docker, run the same command again solve my problem
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With