Du kan inte välja fler än 25 ämnen Ämnen måste starta med en bokstav eller siffra, kan innehålla bindestreck ('-') och vara max 35 tecken långa.

DEVELOPMENT.md 946 B

12345678910111213141516171819202122232425262728293031323334353637
  1. # Development Guide
  2. ## Docker local development setup
  3. You should have docker installed in your system, if not click [here](https://docs.docker.com/get-docker/).
  4. 1. Go to diagrams root directory.
  5. 2. Build the docker image.
  6. ```shell
  7. docker build --tag diagrams:1.0 -f ./docker/dev/Dockerfile .
  8. ```
  9. 3. Create the container, run in background and mount the project source code.
  10. ```shell
  11. docker run -d \
  12. -it \
  13. --name diagrams \
  14. --mount type=bind,source="$(pwd)",target=/usr/src/diagrams \
  15. diagrams:1.0
  16. ```
  17. 4. Run unit tests in the host using the container to confirm that it's working.
  18. ```shell
  19. docker exec diagrams python -m unittest tests/*.py -v
  20. ```
  21. 5. Run the bash script `autogen.sh` to test.
  22. ```shell
  23. docker exec diagrams ./autogen.sh
  24. ```
  25. 6. If the unit tests and the bash script `autogen.sh` is working correctly, then your system is now ready for development.