Advertisement
sandervanvugt

containers feb23

Feb 1st, 2023
76
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 5.85 KB | None | 0 0
  1. PODMAN COMMAND
  2. [student@localhost containers]$ history
  3. 1 sudo dnf update -y
  4. 2 podman
  5. 3 podman run -d nginx
  6. 4 podman ps
  7. 5 sudo dnf install git -y
  8. 6 git clone https://github.com/sandervanvugt/containers
  9. 7 cd containers/
  10. 8 ls
  11. 9 history
  12. 10 ./countdown 12
  13. 11 sudo vim /etc/containers/registries.conf
  14. 12 podman login registry.access.redhat.com
  15. 13 podman login docker.io
  16. 14 docker run docker.io/sandervanvugt/gitops
  17. 15 podman run docker.io/sandervanvugt/gitops
  18. 16 podman ps
  19. 17 podman ps -a
  20. 18 podman run docker.io/sandervanvugt/gitops sleep 3600
  21. 19 podman run -d docker.io/sandervanvugt/gitops sleep 3600
  22. 20 find ~ -name "77b250e0637b3934796350763e86d07a65dfdb3da42879277a63ccda465d053e"
  23. 21 find ~ -name "77b250e0637b3934796350763e86d07a65dfdb3da42879277a63ccda465d053e" 2>/dev/null
  24. 22 podman ps
  25. 23 find ~ -name "77b250e0637b*"
  26. 24 history
  27. 25 podman run -it ubuntu bash
  28. 26 podman run -it fedora bash
  29. 27 podman ps
  30. 28 podman run -it fedora bash
  31. 29 ps aux | grep sleep
  32. 30 ps faux | less
  33. 31 bash
  34. 32 podman run -it fedora bash
  35. 33 podman ps -a
  36. 34 docker run --name web -d nginx
  37. 35 podman run --name web -d nginx
  38. 36 podman ps
  39. 37 podman stop web
  40. 38 podman run --name web -d nginx
  41. 39 podman rm web
  42. 40 podman search ubuntu
  43. 41 podman run -it quay.io/ubuntu bash
  44. 42 podman run -it ubuntu sh
  45. 43 podman ps -a
  46. 44 podman run -d mariadb
  47. 45 podman ps -a
  48. 46 podman logs 313
  49. 47 podman images
  50. 48 podman inspect 039 | less
  51. 49 podman image inspect 039 | less
  52. 50 podman ps
  53. 51 podman container inspect 25f | less
  54. 52 podman stats
  55. 53 history
  56. 54 podman run -d -p 8088:80 nginx
  57. 55 podman ps
  58. 56 curl localhost:8088
  59. 57 alias docker=podman
  60. 58 history
  61. 59 podman run -d --memory="129m" nginx
  62. 60 podman ps
  63. 61 podman stats
  64. 62 man podman-run
  65. 63 podman run -d --cpu-shares=1024 busybox dd if=/dev/zero of=/dev/null
  66. 64 podman run -d --cpu-shares=512 busybox dd if=/dev/zero of=/dev/null
  67. 65 podman run -d --cpu-shares=2048 busybox dd if=/dev/zero of=/dev/null
  68. 66 podman stats
  69. 67 top
  70. 68 sudo -i
  71. 69 podman ps
  72. 70 podman kill ac12 d4cd 116b 191e
  73. 71 podman ps
  74. 72 history
  75. 73 podman ps
  76. 74 podman exec -it goofy_tesla sh
  77. 75 podman ps
  78. 76 podman run --name mydb -d mariadb
  79. 77 podman ps -a
  80. 78 podman logs mariadb
  81. 79 podman logs mydb
  82. 80 podman rm mydb
  83. 81 podman run --name mydb -d --env MARIADB_ROOT_PASSWORD=password mariadb
  84. 82 podman ps
  85. 83 free -m
  86. 84 podman search mariadb
  87. 85 podman images
  88. 86 podman tag -h | less
  89. 87 podman tag daec docker.io/sandervanvugt/gitops:1.0
  90. 88 podman images
  91. 89 podman pull docker.io/library/nginx:1.17
  92. 90 podman images
  93. 91 podman inspect a99 | less
  94. 92 podman pull docker.io/library/ubuntu
  95. 93 podman pull docker.io/library/ubuntu:20.04
  96. 94 podman images
  97. 95 podman tag 66ba docker.io/sandervanvugt/busytest
  98. 96 podman images
  99. 97 podman pull docker.io/sandervanvugt/busytest:latest
  100. 98 podman push docker.io/sandervanvugt/busytest:latest
  101. 99 ls
  102. 100 cd dockerfile/
  103. 101 ls
  104. 102 vim Dockerfile
  105. 103 podman build -h
  106. 104 podman build -h | less
  107. 105 podman build -t centmap:1.0 .
  108. 106 podman images
  109. 107 cd ..
  110. 108 cd alpmap/
  111. 109 ls
  112. 110 vim Dockerfile
  113. 111 podman build -t localhost:5000/alpmap:1.0 .
  114. 112 podman images
  115. 113 history
  116. 114 podman ps
  117. 115 podman images
  118. 116 podman run alpmap:1.0
  119. 117 podman run -it alpmap:1.0 sh
  120. 118 vim Dockerfile
  121. 119 podman build -t alpmap:2.0 .
  122. 120 podman images
  123. 121 podman run -it alpmap sh
  124. 122 podman run -it localhost/alpmap sh
  125. 123 podman run -it localhost/alpmap:2.0 sh
  126. 124 cd ..
  127. 125 ./countdown 12
  128. 126 podman run -d --name newginx nginx
  129. 127 podman ps
  130. 128 podman exec -it newginx sh
  131. 129 podman ps
  132. 130 podman diff newginx
  133. 131 podman commit newnginx
  134. 132 podman commit newginx
  135. 133 podman images
  136. 134 podman tag bf9c1 changedginx
  137. 135 podman images
  138. 136 podman run -d -p 5000:5000 --restart=always --name registry registry:latest
  139. 137 sudo systemctl stop firewalld
  140. 138 podman pull fedora
  141. 139 podman images
  142. 140 podman push localhost:5000/alpmap
  143. 141 podman push localhost:5000/alpmap:1.0
  144. 142 podman push http://localhost:5000/alpmap:1.0
  145. 143 podman push -h | less
  146. 144 podman push --tls-verify=off localhost:5000/alpmap:1.0
  147. 145 podman push --tls-verify off localhost:5000/alpmap:1.0
  148. 146 podman push -h | less
  149. 147 getenforce
  150. 148 podman run --rm -dit --name=bind2 -v "$(pwd)":/app:Z nginx:latest
  151. 149 podman ps
  152. 150 podman exec -it bind2 sh
  153. 151 ls -lrt
  154. 152 podman volume create myvol
  155. 153 podman inspect myvol
  156. 154 podman volume ls
  157. 155 podman volume inspect d5aa
  158. 156 podman run -it --name voltest --rm --mount source=myvol,target=/data nginx:latest /bin/sh
  159. 157 podman run -it --name voltest --rm --mount type=volume,source=myvol,target=/data,Z nginx:latest /bin/sh
  160. 158 podman run -it --name voltest --rm --mount type=volume,source=myvol,target=/data nginx:latest /bin/sh
  161. 159 podman volume inspect myvol
  162. 160 ls -l ~/.local/share/containers/storage/volumes/myvol/_data
  163. 161 podman ps
  164. 162 podman attach voltest
  165. 163 podman ps
  166. 164 ls -l ~/.local/share/containers/storage/volumes/myvol/_data
  167. 165 history
  168.  
  169.  
  170. DOCKER COMMANDS
  171. student@student-virtual-machine:~/containers$ history
  172. 1 docker
  173. 2 docker run -d nginx
  174. 3 docker ps
  175. 4 history
  176. 5 docker run -it --name hacker --privileged -v /:/host redhat/ubi8 chroot /host
  177. 6 cat /etc/hosts
  178. 7 sudo ls -l /root
  179. 8 id
  180. 9 sudo ps aux | grep docker
  181. 10 history
  182.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement