File tree 5 files changed +72
-6
lines changed
5 files changed +72
-6
lines changed Original file line number Diff line number Diff line change @@ -71,7 +71,9 @@ chmod +x check_version_in_toolkit.sh
71
71
```
72
72
73
73
## Use the official image from Docker Hub
74
+
74
75
DockerHub image [ tungbq/devops-toolkit] ( https://hub.docker.com/r/tungbq/devops-toolkit )
76
+
75
77
``` bash
76
78
docker pull tungbq/devops-toolkit:latest
77
79
```
@@ -101,15 +103,23 @@ docker run --rm devops-toolkit:latest ansible --version
101
103
## Running Sample Tool Code Inside the Toolkit
102
104
103
105
Check out the full samples and instruction at [ samples] ( ./samples/ )
106
+
104
107
- Run with default docker network
108
+
105
109
``` bash
106
110
docker run --rm devops-toolkit:latest samples/run_sample.sh
107
111
```
112
+
108
113
- Run with host network
114
+
109
115
``` bash
110
116
docker run --network host --rm devops-toolkit:latest samples/run_sample.sh
111
117
```
112
118
119
+ ## User guide
120
+
121
+ - [ DevOps toolkit user guide] ( ./docs/usage/ )
122
+
113
123
## The DevOps Toolkit Core
114
124
115
125
Built on ` ubuntu:22.04 ` base image
Load Diff This file was deleted.
Original file line number Diff line number Diff line change
1
+ # Most common error
2
+
3
+ - < https://stackoverflow.com/questions/62154016/docker-on-wsl2-very-slow >
4
+
5
+ - exec /usr/local/bin/kubectl: exec format error
6
+ See: < https://stackoverflow.com/questions/73398714/docker-fails-when-building-on-m1-macs-exec-usr-local-bin-docker-entrypoint-sh >
7
+
8
+ - Check architecure: dpkg --print-architecture
9
+
10
+ - docker: Error response from daemon: Conflict. The container name "/my_devops_toolkit" is already in use by container
Original file line number Diff line number Diff line change
1
+ # The devops-toolkit usage
2
+
3
+ This guide us how to use the ` devops-toolkit ` with serveral usecases
4
+
5
+ ## Python
6
+
7
+ - Check [ python_usage] ( ./python_usage.md )
8
+
9
+ ## Troubleshooting
10
+
11
+ - For any issues, check [ this document] ( ../troubleshooting/TROUBLESHOOTING.md )
Original file line number Diff line number Diff line change
1
+ # Use python in the devops-toolkit
2
+
3
+ To use the existing container isntead of creating one, use ` docker exec ` command instead of ` docker run `
4
+
5
+ ``` bash
6
+ docker exec -it my_devops_toolkit /bin/bash
7
+ ```
8
+
9
+ ## Run python sample code provided in the container
10
+
11
+ ``` bash
12
+ docker run --name my_devops_toolkit --network host -it devops-toolkit:latest
13
+ # You now in the container terminal
14
+ python3 samples/python/rectangle_area_calculator.py
15
+ ```
16
+
17
+ ## Clone external code to container
18
+
19
+ ``` bash
20
+ docker run --name my_devops_toolkit --network host -it devops-toolkit:latest
21
+ # You now in the container terminal
22
+
23
+ # Clone code
24
+ mkdir python_workspace
25
+ cd python_workspace
26
+ git clone https://github.com/geekcomputers/Python.git
27
+
28
+ # Now run your cloned script
29
+ cd Python
30
+ python3 Day_of_week.py
31
+ ```
32
+
33
+ ## Mount external code to container
34
+
35
+ Clone the code to the host then mount to container
36
+
37
+ ``` bash
38
+ # Clone code on the host
39
+ docker run --name my_devops_toolkit -v " $( pwd) " :/root/python_workspace --network host -it devops-toolkit:latest
40
+ # Run the python code as usual
41
+ ```
You can’t perform that action at this time.
0 commit comments