Skip to content

Latest commit

 

History

History
33 lines (26 loc) · 837 Bytes

File metadata and controls

33 lines (26 loc) · 837 Bytes

Docker

  • Install from the Setup section
  • Usage
    # clean build (remove `--no-cache` for speed)
    docker-compose build --no-cache --parallel
    
    # start container
    docker-compose up --remove-orphans -d
    
    # exec into container
    docker attach hello
    
    # run command inside container
    python hello.py
    
    # stop container
    docker-compose stop
    
    # destroy container and network
    docker-compose down

Debugging

  • Watch logs in real-time: docker-compose logs -tf --tail="50" hello
  • Check exit code
    $ docker-compose ps
    Name                          Command               State    Ports
    ------------------------------------------------------------------------------
    docker_python      python manage.py runserver ...   Exit 0