Advertisement
sandervanvugt

EX180 july22 day1

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