Skip to content
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

Docker-Compose not Mounting Volumes #5037

Closed
jamieshiz opened this issue Jul 18, 2017 · 6 comments
Closed

Docker-Compose not Mounting Volumes #5037

jamieshiz opened this issue Jul 18, 2017 · 6 comments

Comments

@jamieshiz
Copy link

I previously had a bunch of sites set up using docker-compose and since upgrading to the latest versions of Docker and Docker-Compose, have been getting the following issues.

  1. Project files on my local machine are no longer being mounted
  2. Each container is attempted to be spun up twice
docker-compose up -d
Starting site_db ...
Starting site_db ... done
Creating site ...
Creating site ... done

Docker
Version: 17.06.0-ce

docker-compose version
docker-compose version 1.14.0, build c7bdf9e
docker-py version: 2.3.0
CPython version: 2.7.13
OpenSSL version: OpenSSL 1.0.2j 26 Sep 2016

docker-compose.yml
version: '3'
services:
web:
build: .
container_name: site
ports:
- "8080:80"
- "9000"
- "9004"
volumes:
- ../html:/var/www/html
- ./configs/nginx/default.conf:/etc/nginx/sites-enabled/default
depends_on:
- "db"
db:
image: mysql:5.5
container_name: site_db
volumes:
- ./db:/docker-entrypoint-initdb.d
ports:
- 3306:3306
environment:
MYSQL_ROOT_PASSWORD: password
MYSQL_USER: user
MYSQL_PASSWORD: secret
MYSQL_DATABASE: site_database

@shin-
Copy link

shin- commented Jul 18, 2017

  1. Is probably a docker/for-win issue, as you seem to have correctly identified.
  2. Is only a display issue and has been reported previously in Progress markers are not shown correctly for docker-compose up #4801

@fireboy1919
Copy link

Also seeing #1 using docker for windows.

@meditatingCybermind
Copy link

meditatingCybermind commented Jul 28, 2017

I'm also seeing this issue after freshly installing Docker CE for Mac and testing it out with the getting started guide ( https://docs.docker.com/compose/gettingstarted/ ), with the following information:

docker version

Client:
 Version:      17.06.0-ce
 API version:  1.30
 Go version:   go1.8.3
 Git commit:   02c1d87
 Built:        Fri Jun 23 21:31:53 2017
 OS/Arch:      darwin/amd64

Server:
 Version:      17.06.0-ce
 API version:  1.30 (minimum version 1.12)
 Go version:   go1.8.3
 Git commit:   02c1d87
 Built:        Fri Jun 23 21:51:55 2017
 OS/Arch:      linux/amd64
 Experimental: true

docker-compose version

docker-compose version 1.14.0, build c7bdf9e
docker-py version: 2.3.0
CPython version: 2.7.12
OpenSSL version: OpenSSL 1.0.2j  26 Sep 2016

docker-machine version

docker-machine version 0.12.0, build 45c69ad

docker-compose.yml

version: '2'
services:
  web:
    build: .
    ports:
     - "5000:5000"
    volumes:
     - .:/code
  redis:
    image: "redis:alpine"

Dockerfile

FROM python:3.4-alpine
ADD . /code
WORKDIR /code
RUN pip install -r requirements.txt
CMD ["python", "app.py"]

App does not update on code changes as the getting started guide suggests it should.

@shin-
Copy link

shin- commented Jul 28, 2017

@meditatingCybermind Please report the issue on the docker/for-mac repo.
@fireboy1919 docker/for-win#930

@shin- shin- closed this as completed Aug 7, 2017
@fireboy1919
Copy link

Okay...well, I'm not getting the problem with docker without compose. It only happens with docker compose.

@jpascoe
Copy link

jpascoe commented Mar 22, 2018

Im still having the same issue on new install today.
I had to create docker file to copy config files, but can't mount working directory. Empty when using docker-compose

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants