forked from biswaz/rescuekerala
-
Notifications
You must be signed in to change notification settings - Fork 575
Using Docker
pkrajanand edited this page Sep 2, 2018
·
2 revisions
These instructions will get you a copy of the Docker project up and running on your local machine for development and testing purposes.
- Only pre-requisite is having docker and docker-compose installed
- Execute
sh docker.sh
in this directory (if you do not have permissions on the docker.sh, dochmod +x docker.sh
) - Server will start running at localhost:8000
- Ctrl+C to stop
- Incompatible docker version
- ERROR: Version in "./docker-compose.yaml" is unsupported. You might be seeing this error because you're using the wrong Compose file version. Either specify a version of "2" (or "2.0") and place your service definitions under the services key, or omit the version key and place your service definitions at the root of the file to use version 1. For more on the Compose file format versions, see https://docs.docker.com/compose/compose-file/
- Fix: Update your docker toolkit
- Insufficient permissions
- ERROR: Couldn't connect to Docker daemon at http+docker://localunixsocket - is it running? If it's at a non-standard location, specify the URL with the DOCKER_HOST environment variable.
-
Fix: Run it with sudo -
sudo sh docker.sh
Note:- Docker project would start instances of Postgres, Redis and Django web app within the container as is shown below:-
$ sudo lsof -PiTCP -sTCP:LISTEN
Password:
COMMAND PID USER FD TYPE DEVICE SIZE/OFF NODE NAME
com.docke 13352 someuser1 19u IPv4 0xa1238a8b2787b54b 0t0 TCP *:6379 (LISTEN)
com.docke 13352 someuser1 21u IPv6 0xa1238a8b2c2e8dc3 0t0 TCP localhost:6379 (LISTEN)
com.docke 13352 someuser1 22u IPv4 0xa1238a8b2764a28b 0t0 TCP *:5432 (LISTEN)
com.docke 13352 someuser1 23u IPv6 0xa1238a8b2c2e7103 0t0 TCP localhost:5432 (LISTEN)
com.docke 13352 someuser1 24u IPv4 0xa1238a8b2737728b 0t0 TCP *:8000 (LISTEN)
com.docke 13352 someuser1 25u IPv6 0xa1238a8b2c2e7c83 0t0 TCP localhost:8000 (LISTEN)