File tree Expand file tree Collapse file tree 2 files changed +7
-0
lines changed Expand file tree Collapse file tree 2 files changed +7
-0
lines changed Original file line number Diff line number Diff line change @@ -39,11 +39,13 @@ sudo mv devops-toolkit-cli /usr/local/bin/
39
39
Navigate to your workspace folder, then:
40
40
41
41
- Initialize the docker image, container and configuration directory:
42
+ - If you already init before and want to re-init in new workspace, run ` devops-toolkit-cli cleanup ` before initialization.
42
43
43
44
``` bash
44
45
devops-toolkit-cli init
45
46
# Run 'devops-toolkit-cli init vX.Y.Z' if you want to use specific version.
46
47
# E.g: devops-toolkit-cli init 1.0.2
48
+
47
49
```
48
50
49
51
- Start a shell in new container:
Original file line number Diff line number Diff line change @@ -93,6 +93,11 @@ exec_in_container() {
93
93
}
94
94
95
95
cleanup () {
96
+ read -p " Are you sure you want to remove the container '$CONTAINER_NAME '? Type 'yes' to confirm: " confirmation
97
+ if [ " $confirmation " != " yes" ]; then
98
+ log $YELLOW " Cleanup aborted."
99
+ return
100
+ fi
96
101
log $BLUE " Cleaning up..."
97
102
if docker inspect --type=container " $CONTAINER_NAME " > /dev/null 2>&1 ; then
98
103
docker stop " $CONTAINER_NAME " > /dev/null
You can’t perform that action at this time.
0 commit comments