From 46a0d37f9a0d0d1131212c6076cb03baf66bc6fb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ph=C6=B0=E1=BB=9Bc=20Tr=E1=BA=A7n?= Date: Wed, 2 Oct 2024 08:29:39 +0700 Subject: [PATCH] Issue 1009: update docker --- DEVELOPMENT.md | 14 +++++++------- docker/dev/docker-compose.yml | 11 ----------- 2 files changed, 7 insertions(+), 18 deletions(-) delete mode 100644 docker/dev/docker-compose.yml diff --git a/DEVELOPMENT.md b/DEVELOPMENT.md index 836a647f..9f433805 100644 --- a/DEVELOPMENT.md +++ b/DEVELOPMENT.md @@ -96,20 +96,20 @@ To be able to develop and run diagrams locally on you Mac device, you should hav docker build --tag diagrams:1.0 -f ./docker/dev/Dockerfile . ``` -3. Run the docker-compose file to create the container, run in background and mount the project source code. +3. Create the container, run in background and mount the project source code. ```shell - docker-compose up -d + docker run -d \ + -it \ + --name diagrams \ + --mount type=bind,source="$(pwd)",target=/usr/src/diagrams \ + diagrams:1.0 ``` 4. Run unit tests in the host using the container to confirm that it's working. ```shell - docker exec -it diagrams bash - ``` - - ```shell - python -m unittest tests/*.py -v + docker exec diagrams python -m unittest tests/*.py -v ``` 5. Run the bash script `autogen.sh` to test. diff --git a/docker/dev/docker-compose.yml b/docker/dev/docker-compose.yml deleted file mode 100644 index 4bdb9593..00000000 --- a/docker/dev/docker-compose.yml +++ /dev/null @@ -1,11 +0,0 @@ -version: '3.8' - -services: - diagrams: - image: diagrams:1.0 - container_name: diagrams - volumes: - - ./:/usr/src/diagrams - tty: true - stdin_open: true - restart: always