Advertisement
sandervanvugt

containers dec22

Dec 21st, 2022
96
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 6.00 KB | None | 0 0
  1. [student@localhost ~]$ history
  2. 1 sudo dnf install podman
  3. 2 podman run docker.io/library/ubuntu:latest
  4. 3 podman ps
  5. 4 podman ps -a
  6. 5 podman run -it docker.io/library/ubuntu:latest
  7. 6 podman ps
  8. 7 history
  9. 8 sudo ps faux | less
  10. 9 sudo dnf install git -y
  11. 10 git clone https://github.com/sandervanvugt/containers
  12. 11 cd containers/
  13. 12 ls
  14. 13 ./countdown 12
  15. 14 alias docker=podman
  16. 15 docker run hello-world
  17. 16 unalias docker
  18. 17 docker run hello-world
  19. 18 sudo dnf install podman-docker
  20. 19 sudo rpm -ql podman-docker
  21. 20 ls -l /usr/bin/docker
  22. 21 history
  23. 22 podman run nginx
  24. 23 podman run -d nginx
  25. 24 docker ps
  26. 25 podman inspect 3e6
  27. 26 podman inspect 3e6 | less
  28. 27 podman images
  29. 28 podman inspect cff
  30. 29 podman inspect cff | less
  31. 30 history
  32. 31 podman ps
  33. 32 podman stop cad
  34. 33 podman ps
  35. 34 podman ps -a
  36. 35 sudo find / -name "3a0914*"
  37. 36 cd /home/student/.local/share/containers/storage/overlay-containers/3a0914e2ecd0dda196aea7bc3ae970382006390480feba4721a526636e07b17d
  38. 37 ls
  39. 38 cd userdata/
  40. 39 ls
  41. 40 tree
  42. 41 cd
  43. 42 podman search mariadb
  44. 43 podman search mariadb | wc
  45. 44 sudo vim /etc/containers/registries.conf
  46. 45 podman run -d nginx --name myweb
  47. 46 podman ps
  48. 47 podman ps -a
  49. 48 podman run -d --name myweb nginx
  50. 49 podman ps
  51. 50 podman stop myweb
  52. 51 podman ps
  53. 52 podman run -d -p 8080:80 --name myweb nginx
  54. 53 podman ps -a
  55. 54 podman rm myweb
  56. 55 podman run -d -p 8080:80 --name myweb nginx
  57. 56 podman ps
  58. 57 curl localhost:8080
  59. 58 history
  60. 59 podman run mariadb
  61. 60 podman ps
  62. 61 podman ps -a
  63. 62 podman logs 066
  64. 63 podman stats
  65. 64 cd containers/
  66. 65 ./countdown 12
  67. 66 podman container inspect myweb
  68. 67 podman image inspect docker.io/library/ubuntu:latest
  69. 68 podman run -d --memory="128m" nginx
  70. 69 podman stats
  71. 70 sudo lscpu | less
  72. 71 sudo -i
  73. 72 podman run -d --rm -c 512 busybox dd if=/dev/zero of=/dev/null
  74. 73 podman run -d --rm -c 2048 busybox dd if=/dev/zero of=/dev/null
  75. 74 sudo podman run -d --rm -c 2048 busybox dd if=/dev/zero of=/dev/null
  76. 75 sudo podman run -d --rm -c 512 busybox dd if=/dev/zero of=/dev/null
  77. 76 sudo podman stats
  78. 77 history
  79. 78 sudo ps
  80. 79 sudo podman ps
  81. 80 sudo podman stop 6b3
  82. 81 sudo podman kill 1510
  83. 82 sudo -i
  84. 83 sudo echo 1 > /sys/bus/cpu/devices/cpu1/online
  85. 84 sudo sh -c "echo 1 > /sys/bus/cpu/devices/cpu1/online"
  86. 85 history
  87. 86 history | grep git
  88. 87 ls
  89. 88 vim dockerfile/
  90. 89 podman build -t centmap dockerfile/
  91. 90 podman image ls
  92. 91 podman run centmap
  93. 92 podman run -it centmap sh
  94. 93 ls
  95. 94 cd alpmap/
  96. 95 ls
  97. 96 vim Containerfile
  98. 97 podman build -t alpmap .
  99. 98 ls
  100. 99 touch sander.repo
  101. 100 podman build --no-cache -t alpmap .
  102. 101 podman images
  103. 102 podman pull ubi
  104. 103 podman search ubi
  105. 104 podman pull docker.io/redhat/ubi9-micro
  106. 105 podman images
  107. 106 vim Containerfile
  108. 107 podman run -d --name newginx nginx
  109. 108 podman ps
  110. 109 podman exec -it newginx sh
  111. 110 podman ps
  112. 111 podman diff newginx
  113. 112 podman commit -h | less
  114. 113 podman commit newginx
  115. 114 podman images
  116. 115 podman image tag e09 newginx:latest
  117. 116 podman images
  118. 117 history
  119. 118 cd ..
  120. 119 ./countdown 12
  121. 120 podman run -d -p 5000:5000 --restart=always --name registry registry:latest
  122. 121 podman pull fedora
  123. 122 podman images
  124. 123 podman tag fedora:latest localhost:5000/myfedora
  125. 124 podman push localhost:5000/myfedora
  126. 125 podman push -h
  127. 126 podman push --tls-verify=false localhost:5000/myfedora
  128. 127 podman rmi fedora
  129. 128 podman exec -it registry sh
  130. 129 podman pull localhost:5000/myfedora
  131. 130 podman pull --tls-verify=false localhost:5000/myfedora
  132. 131 history
  133. 132 mkdir myfiles
  134. 133 cd
  135. 134 mkdir files
  136. 135 podman run -v /home/student/files:/files:Z -it busybox sh
  137. 136 ls -l files/
  138. 137 podman volume create myvol
  139. 138 podman volume ls
  140. 139 podman volume inspect myvol
  141. 140 podman volume inspect 365
  142. 141 podman volume inspect 216
  143. 142 alias
  144. 143 podman run -it --name voltest --rm --mount source=myvol,target=/data nginx sh
  145. 144 podman run -it --name voltest --rm --mount type=volume,source=myvol,target=/data nginx sh
  146. 145 podman volume inspect myvol
  147. 146 ls -l /home/student/.local/share/containers/storage/volumes/myvol/_data
  148. 147 podman run -it --name voltest2 --rm --mount type=volume,src=myvol,target=data nginx sh
  149. 148 podman run -it --name voltest2 --rm --mount type=volume,src=myvol,target=/data nginx sh
  150. 149 ls -l /home/student/.local/share/containers/storage/volumes/myvol/_data
  151. 150 sudo dnf install nfs-server
  152. 151 sudo dnf install nfs-utils
  153. 152 sudo mkdir /nfsdata
  154. 153 sudo vim /etc/exports
  155. 154 sudochown nobody:nogroup /nfsdata
  156. 155 sudo chown nobody:nogroup /nfsdata
  157. 156 sudo chmod 777 /nfsdata
  158. 157 sudo setenforce 0
  159. 158 sudo systemctl restart nfs-server
  160. 159 showmount -e localhost
  161. 160 ip a
  162. 161 podman volume create --driver=local --opt type=nfs --opt o=addr=192.168.29.138,rw --opt device=:/nfsdata nfsvol
  163. 162 podman volume ls
  164. 163 podman volume inspect nfsvol
  165. 164 podman run -it --name voltest3 --rm --mount type=volume,src=nfsvol,target=/data nginx sh
  166. 165 #sudo podman run -it --name voltest3 --rm --mount type=volume,src=nfsvol,target=/data nginx sh
  167. 166 sudo podman volume create --driver=local --opt type=nfs --opt o=addr=192.168.29.138,rw --opt device=:/nfsdata nfsvol
  168. 167 sudo podman run -it --name voltest3 --rm --mount type=volume,src=nfsvol,target=/data nginx sh
  169. 168 sudo podman run -it --name voltest3 --rm --mount type=volume,src=nfsvol,target=/data busybox sh
  170. 169 sudo podman run -it --name voltest3 --rm --mount src=nfsvol,target=/data nginx sh
  171. 170 history
  172.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement