Advertisement
sandervanvugt

ex180 feb23 day1

Feb 6th, 2023
46
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 11.93 KB | None | 0 0
  1. [student@localhost ~]$ history
  2. 1 sudo dnf upgrade -y
  3. 2 sudo dnf install -y git
  4. 3 git clone https://github.com/sandervanvugt/ex180
  5. 4 cd ex180
  6. 5 ls
  7. 6 history
  8. 7 sudo podman search ubi
  9. 8 sudo podman pull docker.io/redhat/ubi8
  10. 9 podman images
  11. 10 sudo podman images
  12. 11 podman run ubi8
  13. 12 sudo vim /etc/containers/registries.conf
  14. 13 ls -l /etc/containers/registries.conf.d/
  15. 14 podman ps
  16. 15 podman ps -a
  17. 16 podman run ubi8ubi echo hello world
  18. 17 podman run ubi8/ubi echo hello world
  19. 18 podman ps -a
  20. 19 podman run nginx
  21. 20 podman run docker.io/library/nginx
  22. 21 podman run docker.io/library/nginx -d
  23. 22 podman run -d docker.io/library/nginx
  24. 23 podman ps
  25. 24 podman run -it ubi8/ubi
  26. 25 podman ps
  27. 26 podman attach -it 581
  28. 27 podman attach 581
  29. 28 ps faux | less
  30. 29 podman ps
  31. 30 sudo ip a
  32. 31 podman inspect -l -f "{{.NetworkSettings.IPAddress}}"
  33. 32 podman inspect -l
  34. 33 sudo podman run -d nginx
  35. 34 sudo ip a
  36. 35 sudo podman inspect -l -f "{{.NetworkSettings.IPAddress}}"
  37. 36 podman run -d mariadb
  38. 37 podman run -d docker.io/library/mariadb
  39. 38 find . -name "c7af4aea09510957bad3c5d75f8d41dfc2cfb8f2ec448e1316590d306b235649"
  40. 39 sudo find . -name "c7af4aea09510957bad3c5d75f8d41dfc2cfb8f2ec448e1316590d306b235649"
  41. 40 sudo find . -name "c7af4aea09510957bad3c5d75f8d41dfc2cfb8f2ec448e1316590d306b235649*"
  42. 41 podman ps
  43. 42 podman ps -a
  44. 43 podman logs c7a
  45. 44 podman run -d -e MARIADB_ROOT_PASSWORD=password docker.io/library/mariadb
  46. 45 podman ps
  47. 46 ./countdown 13
  48. 47 podman login docker.io
  49. 48 podman images
  50. 49 podman image rm mariadb:latest
  51. 50 podman ps
  52. 51 podman stop edb
  53. 52 podman image rm mariadb:latest
  54. 53 podman ps
  55. 54 podman ps -a
  56. 55 podman rm edb
  57. 56 podman rm c7a
  58. 57 podman image rm mariadb:latest
  59. 58 podman images
  60. 59 podman ps
  61. 60 podman exec -it infallible_solomon sh
  62. 61 podman ps
  63. 62 podman save -h | less
  64. 63 #podman save --format oci-archive -o xxxxx
  65. 64 podman images
  66. 65 #podman save --format oci-archive -o sanderginx.tar 9eee96112def
  67. 66 podman save --format oci-archive -o sanderginx.tar 9eee96112def
  68. 67 ls -lrt
  69. 68 cd
  70. 69 find . -name "9eee*"
  71. 70 find . -name "9eee*" 2>/dev/null
  72. 71 history
  73. 72 podman image inspect docker.io/library/nginx:latest
  74. 73 podman image inspect docker.io/library/nginx:latest | less
  75. 74 podman search mysql
  76. 75 sudo podman pull registry.redhat.io/rhscl/mysql-57-rhel7
  77. 76 sudo podman login registry.redhat.io
  78. 77 sudo podman pull registry.redhat.io/rhscl/mysql-57-rhel7
  79. 78 sudo podman inspect registry.redhat.io/rhscl/mysql-57-rhel7 | less
  80. 79 sudo mkdir /srv/dbfiles
  81. 80 sudo chown -R 27:27 /srv/dbfiles
  82. 81 ls -ld /srv/dbfiles/
  83. 82 ls -ldZ /srv/dbfiles/
  84. 83 sudo semanage fcontext -a -t container_file_t "/srv/dbfiles(/.*)?"
  85. 84 ls -ldZ /srv/dbfiles/
  86. 85 sudo podman run -d -v /srv/dbfiles:/var/lib/mysql -e MYSQL_ROOT_PASSWORD=password registry.redhat.io/rhscl/mysql-57-rhel7
  87. 86 ls -lZ /srv/dbfiles/
  88. 87 sudo podman ps -a
  89. 88 sudo podman rm ec59
  90. 89 sudo restorecon -Rv /srv/dbfiles
  91. 90 sudo podman run -d -v /srv/dbfiles:/var/lib/mysql -e MYSQL_ROOT_PASSWORD=password registry.redhat.io/rhscl/mysql-57-rhel7
  92. 91 ls -lZ /srv/dbfiles/
  93. 92 history
  94. 93 whoami
  95. 94 mkdir dbfiles
  96. 95 ls -l
  97. 96 podman run -d -v /home/student/dbfiles:/var/lib/mysql:Z -e MYSQL_ROOT_PASSWORD=password registry.redhat.io/rhscl/mysql-57-rhel7
  98. 97 podman login registry.redhat.io
  99. 98 podman run -d -v /home/student/dbfiles:/var/lib/mysql:Z -e MYSQL_ROOT_PASSWORD=password registry.redhat.io/rhscl/mysql-57-rhel7
  100. 99 ls -lZ dbfiles/
  101. 100 history
  102. 101 podman run -d -p 8088:80 docker.io/library/nginx
  103. 102 podman ps
  104. 103 curl localhost:8088
  105. 104 sudo podman run -it quay.io/quay/busybox sh
  106. 105 ps aux | grep 1001
  107. 106 podman run -it quay.io/quay/busybox sh
  108. 107 ps aux | grep sleep
  109. 108 sudo podman run -it -u 27 quay.io/quay/busybox sh
  110. 109 ps aux | grep sleep
  111. 110 podman run -it -u 27 quay.io/quay/busybox sh
  112. 111 ps au | grep sleep
  113. 112 history
  114. 113 podman run -it quay.io/quay/busybox sh
  115. 114 ps aux | grep 6000
  116. 115 ls -lZ dbfiles/
  117. 116 podman unshare ls -ld dbfiles/
  118. 117 ls -ld dbfiles/
  119. 118 podman unsahre chown 27:27 -R dbfiles
  120. 119 podman unsahre chown -R 27:27 dbfiles
  121. 120 podman unshare chown 27:27 -R dbfiles
  122. 121 podman unshare ls -ld dbfiles/
  123. 122 podman top -l user huser
  124. 123 sudo dnf provides */Containerfile
  125. 124 sudo find / -name "Containerfile"
  126. 125 cd ex180/
  127. 126 ls
  128. 127 cd sample-dockerfile/
  129. 128 ls
  130. 129 vim Dockerfile
  131. 130 podman build -t centmap:1.0 .
  132. 131 podman images
  133. 132 podman run localhost/centmap
  134. 133 podman run localhost/centmap:1.0
  135. 134 mkdir alpmap
  136. 135 mkdir ../alpmap
  137. 136 cp Dockerfile ../alpmap/
  138. 137 cd ../alpmap/
  139. 138 vim Dockerfile
  140. 139 podman build -t alpmap .
  141. 140 podman images
  142. 141 podman run -it alpmap sh
  143. 142 podman run -ti centmap:1.0 sh
  144. 143 cd -
  145. 144 vim Dockerfile
  146. 145 ../countdown 12
  147. 146 cd
  148. 147 sudo useradd linda
  149. 148 sudo passwd linda
  150. 149 sudo loginctl enable-linger linda
  151. 150 ssh linda@localhost
  152. 151 history -w
  153. 152 cd ex180/
  154. 153 ./countdown 20
  155. 154 sudo dnf upgrade -y
  156. 155 sudo dnf install -y git
  157. 156 git clone https://github.com/sandervanvugt/ex180
  158. 157 cd ex180
  159. 158 ls
  160. 159 history
  161. 160 sudo podman search ubi
  162. 161 sudo podman pull docker.io/redhat/ubi8
  163. 162 podman images
  164. 163 sudo podman images
  165. 164 podman run ubi8
  166. 165 sudo vim /etc/containers/registries.conf
  167. 166 ls -l /etc/containers/registries.conf.d/
  168. 167 podman ps
  169. 168 podman ps -a
  170. 169 podman run ubi8ubi echo hello world
  171. 170 podman run ubi8/ubi echo hello world
  172. 171 podman ps -a
  173. 172 podman run nginx
  174. 173 podman run docker.io/library/nginx
  175. 174 podman run docker.io/library/nginx -d
  176. 175 podman run -d docker.io/library/nginx
  177. 176 podman ps
  178. 177 podman run -it ubi8/ubi
  179. 178 podman ps
  180. 179 podman attach -it 581
  181. 180 podman attach 581
  182. 181 ps faux | less
  183. 182 podman ps
  184. 183 sudo ip a
  185. 184 podman inspect -l -f "{{.NetworkSettings.IPAddress}}"
  186. 185 podman inspect -l
  187. 186 sudo podman run -d nginx
  188. 187 sudo ip a
  189. 188 sudo podman inspect -l -f "{{.NetworkSettings.IPAddress}}"
  190. 189 podman run -d mariadb
  191. 190 podman run -d docker.io/library/mariadb
  192. 191 find . -name "c7af4aea09510957bad3c5d75f8d41dfc2cfb8f2ec448e1316590d306b235649"
  193. 192 sudo find . -name "c7af4aea09510957bad3c5d75f8d41dfc2cfb8f2ec448e1316590d306b235649"
  194. 193 sudo find . -name "c7af4aea09510957bad3c5d75f8d41dfc2cfb8f2ec448e1316590d306b235649*"
  195. 194 podman ps
  196. 195 podman ps -a
  197. 196 podman logs c7a
  198. 197 podman run -d -e MARIADB_ROOT_PASSWORD=password docker.io/library/mariadb
  199. 198 podman ps
  200. 199 ./countdown 13
  201. 200 podman login docker.io
  202. 201 podman images
  203. 202 podman image rm mariadb:latest
  204. 203 podman ps
  205. 204 podman stop edb
  206. 205 podman image rm mariadb:latest
  207. 206 podman ps
  208. 207 podman ps -a
  209. 208 podman rm edb
  210. 209 podman rm c7a
  211. 210 podman image rm mariadb:latest
  212. 211 podman images
  213. 212 podman ps
  214. 213 podman exec -it infallible_solomon sh
  215. 214 podman ps
  216. 215 podman save -h | less
  217. 216 #podman save --format oci-archive -o xxxxx
  218. 217 podman images
  219. 218 #podman save --format oci-archive -o sanderginx.tar 9eee96112def
  220. 219 podman save --format oci-archive -o sanderginx.tar 9eee96112def
  221. 220 ls -lrt
  222. 221 cd
  223. 222 find . -name "9eee*"
  224. 223 find . -name "9eee*" 2>/dev/null
  225. 224 history
  226. 225 podman image inspect docker.io/library/nginx:latest
  227. 226 podman image inspect docker.io/library/nginx:latest | less
  228. 227 podman search mysql
  229. 228 sudo podman pull registry.redhat.io/rhscl/mysql-57-rhel7
  230. 229 sudo podman login registry.redhat.io
  231. 230 sudo podman pull registry.redhat.io/rhscl/mysql-57-rhel7
  232. 231 sudo podman inspect registry.redhat.io/rhscl/mysql-57-rhel7 | less
  233. 232 sudo mkdir /srv/dbfiles
  234. 233 sudo chown -R 27:27 /srv/dbfiles
  235. 234 ls -ld /srv/dbfiles/
  236. 235 ls -ldZ /srv/dbfiles/
  237. 236 sudo semanage fcontext -a -t container_file_t "/srv/dbfiles(/.*)?"
  238. 237 ls -ldZ /srv/dbfiles/
  239. 238 sudo podman run -d -v /srv/dbfiles:/var/lib/mysql -e MYSQL_ROOT_PASSWORD=password registry.redhat.io/rhscl/mysql-57-rhel7
  240. 239 ls -lZ /srv/dbfiles/
  241. 240 sudo podman ps -a
  242. 241 sudo podman rm ec59
  243. 242 sudo restorecon -Rv /srv/dbfiles
  244. 243 sudo podman run -d -v /srv/dbfiles:/var/lib/mysql -e MYSQL_ROOT_PASSWORD=password registry.redhat.io/rhscl/mysql-57-rhel7
  245. 244 ls -lZ /srv/dbfiles/
  246. 245 history
  247. 246 whoami
  248. 247 mkdir dbfiles
  249. 248 ls -l
  250. 249 podman run -d -v /home/student/dbfiles:/var/lib/mysql:Z -e MYSQL_ROOT_PASSWORD=password registry.redhat.io/rhscl/mysql-57-rhel7
  251. 250 podman login registry.redhat.io
  252. 251 podman run -d -v /home/student/dbfiles:/var/lib/mysql:Z -e MYSQL_ROOT_PASSWORD=password registry.redhat.io/rhscl/mysql-57-rhel7
  253. 252 ls -lZ dbfiles/
  254. 253 history
  255. 254 podman run -d -p 8088:80 docker.io/library/nginx
  256. 255 podman ps
  257. 256 curl localhost:8088
  258. 257 sudo podman run -it quay.io/quay/busybox sh
  259. 258 ps aux | grep 1001
  260. 259 podman run -it quay.io/quay/busybox sh
  261. 260 ps aux | grep sleep
  262. 261 sudo podman run -it -u 27 quay.io/quay/busybox sh
  263. 262 ps aux | grep sleep
  264. 263 podman run -it -u 27 quay.io/quay/busybox sh
  265. 264 ps au | grep sleep
  266. 265 history
  267. 266 podman run -it quay.io/quay/busybox sh
  268. 267 ps aux | grep 6000
  269. 268 ls -lZ dbfiles/
  270. 269 podman unshare ls -ld dbfiles/
  271. 270 ls -ld dbfiles/
  272. 271 podman unsahre chown 27:27 -R dbfiles
  273. 272 podman unsahre chown -R 27:27 dbfiles
  274. 273 podman unshare chown 27:27 -R dbfiles
  275. 274 podman unshare ls -ld dbfiles/
  276. 275 podman top -l user huser
  277. 276 sudo dnf provides */Containerfile
  278. 277 sudo find / -name "Containerfile"
  279. 278 cd ex180/
  280. 279 ls
  281. 280 cd sample-dockerfile/
  282. 281 ls
  283. 282 vim Dockerfile
  284. 283 podman build -t centmap:1.0 .
  285. 284 podman images
  286. 285 podman run localhost/centmap
  287. 286 podman run localhost/centmap:1.0
  288. 287 mkdir alpmap
  289. 288 mkdir ../alpmap
  290. 289 cp Dockerfile ../alpmap/
  291. 290 cd ../alpmap/
  292. 291 vim Dockerfile
  293. 292 podman build -t alpmap .
  294. 293 podman images
  295. 294 podman run -it alpmap sh
  296. 295 podman run -ti centmap:1.0 sh
  297. 296 cd -
  298. 297 vim Dockerfile
  299. 298 ../countdown 12
  300. 299 cd
  301. 300 sudo useradd linda
  302. 301 sudo passwd linda
  303. 302 sudo loginctl enable-linger linda
  304. 303 ssh linda@localhost
  305. 304 history -w
  306. 305 sudo reboot
  307. 306 sudo ps faux | less
  308. 307 history
  309. 308 ssh linda@localhost
  310. 309 history
  311.  
  312. linda@localhost ~]$ history
  313. 1 ls -l .config
  314. 2 mkdir -p .config/systemd/user
  315. 3 cd .config/systemd/user/
  316. 4 podman run -d --name mynginx -p 8081:80 nginx
  317. 5 podman ps
  318. 6 podman generate --help
  319. 7 podman generate systemd --help
  320. 8 podman generate systemd --name mynginx --files --new
  321. 9 vim container-mynginx.service
  322. 10 systemctl --user daemon-reload
  323. 11 systemctl --user enable container-mynginx.service
  324. 12 systemctl --user status container-mynginx.service
  325. 13 history -w
  326. 14 ls -l .config
  327. 15 mkdir -p .config/systemd/user
  328. 16 cd .config/systemd/user/
  329. 17 podman run -d --name mynginx -p 8081:80 nginx
  330. 18 podman ps
  331. 19 podman generate --help
  332. 20 podman generate systemd --help
  333. 21 podman generate systemd --name mynginx --files --new
  334. 22 vim container-mynginx.service
  335. 23 systemctl --user daemon-reload
  336. 24 systemctl --user enable container-mynginx.service
  337. 25 systemctl --user status container-mynginx.service
  338. 26 history -w
  339. 27 exit
  340. 28 history
  341.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement