Repository navigation
Expand file tree
/
Copy pathdev
More file actions
146 lines (91 loc) · 2.3 KB
/
Copy pathdev
File metadata and controls
146 lines (91 loc) · 2.3 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
Get-Command git | Select-Object Source
javac Test.java
java Test
#!/bin/bash
echo "Step 0: Check Docker Installation"
docker version
docker info
echo
echo "Step 1: Pull Python Image"
docker pull python:3.9.18-slim-bullseye
echo
echo "Step 2: List Docker Images"
docker images
docker images -q
docker images -a
docker image ls
echo
echo "Step 3: Run a Container (detached mode to show in docker ps)"
docker run -d --name mypython python:3.9.18-slim-bullseye tail -f /dev/null
echo
echo "Step 4: Check Running Containers"
docker ps
echo
echo "Step 5: Check All Containers"
docker ps -a
echo
echo "Step 6: Inspect Image and Container"
docker inspect python:3.9.18-slim-bullseye
docker inspect mypython
echo
echo "Step 7: Stop the Container"
docker stop mypython
echo
echo "Step 8: Verify Container Stopped"
docker ps -a
echo
echo "Step 9: Remove the Container"
docker rm mypython
echo
echo "Step 10: Remove the Image"
docker rmi python:3.9.18-slim-bullseye
echo
echo "Docker Practical Exam Completed Successfully!"
# Create a new project folder
mkdir GitDemo
cd GitDemo
# Initialize Git repository
git init
# Add a file
echo "Hello from Shreyas" > demo.txt
git status
# Add file to staging area
git add demo.txt
# Commit the changes
git commit -m "Initial commit by Shreyas"
# Connect local repo with remote repository
git remote add origin https://github.com/shreyas/GitDemo.git
# Push files to remote repository
git branch -M main
git push -u origin main
# Create and initialize repository
mkdir GitBranchDemo
cd GitBranchDemo
git init
# Add and commit files
echo "Main branch file by Shreyas" > main.txt
git add .
git commit -m "Main branch initial commit by Shreyas"
# Create a new branch
git branch feature
# Switch to the new branch
git checkout feature
# Add files in feature branch
echo "Feature branch changes by Shreyas" > feature.txt
git add .
git commit -m "Added feature file by Shreyas"
# Switch back to main branch
git checkout main
# Merge branch
git merge feature
# Clone repository to local system
git clone https://github.com/shreyas/RemoteGitDemo.git
cd RemoteGitDemo
# Add new files
echo "This is Shreyas's remote demo" > remote.txt
git add .
git commit -m "Added remote demo file by Shreyas"
# Push changes to remote
git push origin main
# Pull latest updates
git pull origin main