sandervanvugt

Ex180 feb22 day1

Feb 14th, 2022
279
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 5.48 KB | None | 0 0
  1. [student@ex180 sample-dockerfile]$ history
  2. 1 sudo vim /etc/containers/registries.conf
  3. 2 sudo podman search ubi
  4. 3 sudo podman search ubi | less
  5. 4 sudo podman pull registry.access.redhat.com/ubi8/ubi-minimal
  6. 5 #sudo podman login registry.access.redhat.com
  7. 6 sudo podman pull registry.access.redhat.com/ubi8/ubi
  8. 7 sudo podman images
  9. 8 history
  10. 9 podman images
  11. 10 podman run ubi8
  12. 11 podman images
  13. 12 podman ps
  14. 13 podman ps -a
  15. 14 podman run ubi8/ubi echo hello world
  16. 15 podman ps -a
  17. 16 podman run nginx
  18. 17 podman ps -a
  19. 18 podman run -d nginx
  20. 19 podman ps
  21. 20 podman run -it ubi8/ubi /bin/bash
  22. 21 podman ps
  23. 22 pd fax
  24. 23 ps fax
  25. 24 sudo dnf install -y git
  26. 25 git clone https://github.com/sandervanvugt/ex180
  27. 26 cd ex180
  28. 27 ls
  29. 28 history
  30. 29 sleep 120; ./countdown 10
  31. 30 podman ps
  32. 31 sudo ip a
  33. 32 podman inspect -l
  34. 33 podman inspect -l -d "{{.NetworkSettings.IPAddress}}"
  35. 34 podman inspect -l -f "{{.NetworkSettings.IPAddress}}"
  36. 35 sudo podman run -d nginx
  37. 36 sudo ip a
  38. 37 sudo podman inspect -l -f "{{.NetworkSettings.IPAddress}}"
  39. 38 podman run -it busybox
  40. 39 podman ps
  41. 40 ps fax
  42. 41 history
  43. 42 sudo podman run mariadb
  44. 43 sudo podman ps
  45. 44 sudo podman ps -a
  46. 45 sudo podman logs -l
  47. 46 sudo podman run mariadb -d -e MYSQL_ROOT_PASSWORD=password
  48. 47 sudo podman run -d -e MYSQL_ROOT_PASSWORD=password mariadb
  49. 48 sudo podman ps
  50. 49 podman login -u sandervanvugt docker.io
  51. 50 podman run quay.io/bitnami/nginx
  52. 51 history
  53. 52 podman images
  54. 53 podman rmi docker.io/library/nginx
  55. 54 docker
  56. 55 podman rmi docker.io/library/nginx
  57. 56 docker ps -a
  58. 57 podman ps -a
  59. 58 podman stop peaceful_bhabha
  60. 59 podman kill suspicious_murdock
  61. 60 podman images
  62. 61 podman tag quay.io/bitnami/nginx quay.io/bitnami/nginx:sander
  63. 62 podman images
  64. 63 podman run -d --name newnginx nginx
  65. 64 podman ps
  66. 65 podman exec -it newnginx sh
  67. 66 podman ps
  68. 67 podman diff newnginx
  69. 68 podman commit newnginx mynginx:1.0
  70. 69 podman images
  71. 70 podman run -f nginx
  72. 71 podman run -d nginx
  73. 72 podman exec -it a4fbac8eef77 bash
  74. 73 podman ps
  75. 74 podman run -it nginx bash
  76. 75 podman ps
  77. 76 ./countdown 12
  78. 77 podman ps
  79. 78 podman images
  80. 79 find . -name "1861655b92f4*"
  81. 80 find . -name "1861655b92f4"
  82. 81 sudo find / -name "1861655b92f4"
  83. 82 sudo find / -name "1861655b92f4*"
  84. 83 cd ..
  85. 84 cd .local/
  86. 85 ls
  87. 86 cd share
  88. 87 ls
  89. 88 cd containers/
  90. 89 ls
  91. 90 tree
  92. 91 podman ps
  93. 92 find . -name 786153f3e08b
  94. 93 sudo find . -name "786153f3e08b"
  95. 94 sudo find . -name "786153f3e08b*"
  96. 95 cd storage/
  97. 96 cd overlay-containers/786153f3e08bb46a521d2eb9618d73b7cbbf662faa8a249db4c72fd00b29a2d5/
  98. 97 ls
  99. 98 cd userdata/
  100. 99 ls
  101. 100 pwd
  102. 101 cd
  103. 102 podman images
  104. 103 podman inspect quay.io/bitnami/nginx | less
  105. 104 sudo mkdir /demo
  106. 105 sudo chown 1001:1001 /demo
  107. 106 podman search mysql
  108. 107 podman search mysql | grep 57
  109. 108 sudo podman pull registry.access.redhat.com/rhscl/mysql-57-rhel7
  110. 109 sudo podman pull registry.centos.org/centos/mysql-57-centos7
  111. 110 sudo podman inspect registry.centos.org/centos/mysql-57-centos7 |less
  112. 111 history
  113. 112 sudo mkdir /srv/dbfiles
  114. 113 sudo chown -R 27:27 /srv/dbfiles
  115. 114 sudo ls -ld /srv/dbfiles/
  116. 115 sudo ls -ldZ /srv/dbfiles/
  117. 116 sudo semanage fcontext -a -t container_file_t "/srv/dbfiles(/.*)?"
  118. 117 sudo restorecon -Rv /srv/dbfiles
  119. 118 sudo podman run -d -v /srv/dbfiles:/var/lib/mysql -e MYSQL_ROOT_PASSWORD=password registry.centos.org/centos/mysql-57-centos7
  120. 119 sudo podman os
  121. 120 sudo podman ps
  122. 121 ls -l /srv/dbfiles/
  123. 122 sudo podman stop xenodochial_montalcini
  124. 123 ls -l /srv/dbfiles/
  125. 124 sudo podman rm xenodochial_montalcini
  126. 125 ls -l /srv/dbfiles/
  127. 126 history
  128. 127 mkdir dbfiles
  129. 128 ls -ldZ dbfiles/
  130. 129 podman run -d -v /home/student/dbfiles:/var/lib/mysql:Z -e MYSQL_ROOT_PASSWORD=password registry.centos.org/centos/mysql-57-centos7
  131. 130 podman ps
  132. 131 ls -ldZ dbfiles/
  133. 132 history
  134. 133 sudo podman run -d -p 8088:80 nginx
  135. 134 sudo podman ps
  136. 135 curl localhost:8088
  137. 136 sudo podman port
  138. 137 sudo podman port vibrant_euler
  139. 138 ex180/countdown 18
  140. 139 sudo podman run -it quay.io/quay/busybox sh
  141. 140 ps faux | grep sleep
  142. 141 podman run -it quay.io/quay/busybox sh
  143. 142 ps aux | grep sleep
  144. 143 sudo podman run -it -u 27 quay.io/quay/busybox sh
  145. 144 ps aux | grep sleep
  146. 145 podman run -it -u 27 quay.io/quay/busybox sh
  147. 146 ps aux | grep sleep
  148. 147 sudo useradd -u 2345 bob
  149. 148 sudo passwd bob
  150. 149 podman run -it quay.io/quay/busybox sh
  151. 150 ps aux | grep 5000
  152. 151 podman top -l user huser args
  153. 152 cd ex180/
  154. 153 ls
  155. 154 cd sample-dockerfile/
  156. 155 ls
  157. 156 vim Dockerfile
  158. 157 podman build -t nmapep
  159. 158 podman build -t nmapep .
  160. 159 vim Dockerfile
  161. 160 podman build -t nmapep .
  162. 161 podman images
  163. 162 podman run nmapep
  164. 163 podman run -it nmapep bash
  165. 164 vim Dockerfile
  166. 165 podman build -t nmapcmd .
  167. 166 podman images
  168. 167 podman run nmapcmd
  169. 168 podman run -it nmapcmd bash
  170. 169 sudo dnf provides */Dockerfile
  171. 170 sudo dnf provides */Dockerfile | less
  172. 171 ../countdown 12
  173. 172 history
  174.  
Advertisement
Add Comment
Please, Sign In to add comment