What is the difference between docker-machine and docker-compose? : <p>I think  I don't get it. First, I created docker-machine:</p>

<pre><code>$ docker-machine create -d virtualbox dev
$ eval $(docker-machine env dev)
</code></pre>

<p>Then I wrote Dockerfile and docker-compose.yml:</p>

<pre><code>FROM python:2.7
ENV PYTHONUNBUFFERED 1
RUN mkdir /code
WORKDIR /code
ADD requirements.txt /code/
RUN pip install -r requirements.txt
ADD . /code/


version: '2'
services:
  db:
    image: postgres
  web:
    build: .
    restart: always
    command: python manage.py runserver 0.0.0.0:8000
    volumes:
      - .:/code
    ports:
      - "8000:8000"
    links:
      - db
</code></pre>

<p>Finally, I built and started the image:</p>

<pre><code>$ docker-compose build --no-cache
$ docker-compose start
</code></pre>

<p>I checked ip of my virtual machine</p>

<pre><code>$ docker-machine ip dev
</code></pre>

<p>and successfully opened the site in my browser. But when I made some changes in my code - nothing happened. So I logged to the "dev" machine:</p>

<pre><code>$ docker-machine ssh dev
</code></pre>

<p>and I didn't find my code! So I logged to the docker "web" image:</p>

<pre><code>$ docker exec -it project_web_1 bash
</code></pre>

<p>and there was a code, but unchanged.</p>

<p>What is the docker-machine for? What is the sense? Why docker doesn't syncing files after changes? It looks like docker + docker-machine + docker-compose are pain in the a...s for local development :-)</p>

<p>Thanks.</p>
