docker-compose not showing any changes to code

I am working on a project that uses docker-compose up to start up and run. I am not very familiar with docker-compose and I couldn’t really find an answer in the docs. According to the docs the up command rebuilds the container from the docker file, however this does not seem to happen.

When I try to add print commands for debugging nothing happens. The program already throws a few print commands and I tried changing those to be sure, and they always print the same. Do I have to add something to the up command to make the container rebuild?

  • How to find out how much RAM a docker run execution consumed at maximum?
  • Docker and UFW with real IP
  • how get env variables from docker in symfony yml config file
  • Docker container on windows 10 unable to access host folder. It shows empty.
  • call a docker container from another container
  • Dockerfile build - possible to ignore error?
  • docker-compose/yml:

      build: .
        - "/sys:/sys"
        - "/var/run/docker.sock:/var/run/docker.sock"

  • how to configure sensu keepalive to throw an alert to slack
  • confused with CMD and ENTRYPOINT in dockerfile
  • Assigning vhosts to Docker ports
  • error retrieving template Job(deis-router@.service) from Registry in ec2 deis installation
  • Connection error for MongoDb replica-set using docker-compose
  • Possible to run Google Standard Managed VM Locally with Docker for Development?
  • One Solution collect form web for “docker-compose not showing any changes to code”

    As far as I can tell, docker-compose up only builds images that don’t exist already; it will not rebuild an image whose source has changed. If you want to rebuild your image, run docker-compose build before docker-compose up.

    Docker will be the best open platform for developers and sysadmins to build, ship, and run distributed applications.