From ea6c295df5e878a9d13738166c0b079b5b50151d Mon Sep 17 00:00:00 2001 From: JJ-Cronos Date: Fri, 17 May 2024 11:42:13 +0200 Subject: [PATCH] ref: Better container init in shell --- README.md | 10 ++-------- run-container.sh | 1 + 2 files changed, 3 insertions(+), 8 deletions(-) create mode 100644 run-container.sh diff --git a/README.md b/README.md index 1886584a..eda4ce3f 100644 --- a/README.md +++ b/README.md @@ -53,16 +53,10 @@ You have two option for starting the docker container for development: ### Manually start the container -1. Start the containers with docker-compose. +1. Run the following script ```sh -docker-compose -f .devcontainer/docker-compose.yml up -d -``` - -2. Execute (open) the working directory of the container. - -```sh -docker exec -e "TERM=xterm-256color" -w /workspace/development -it devcontainer-frappe-1 bash +sudo ./run-container.sh ``` > Note: Your **terminal** is now open in the development workspace. However, the VsCode **window** is not. diff --git a/run-container.sh b/run-container.sh new file mode 100644 index 00000000..870aa370 --- /dev/null +++ b/run-container.sh @@ -0,0 +1 @@ +docker-compose -f .devcontainer/docker-compose.yml up -d && docker exec -e \"TERM=xterm-256color\" -w /workspace/development -it devcontainer-frappe-1 bash