Advertisement
sandervanvugt

containers feb24

Feb 22nd, 2024
97
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 4.82 KB | None | 0 0
  1. [root@localhost ~]# history
  2. 1 dnf update -y
  3. 2 man 7 namespaces
  4. 3 podman run -it docker.io/library/ubuntu
  5. 4 podman ps
  6. 5 podman run -d docker.io/library/nginx
  7. 6 podman ps
  8. 7 dnf install -y git
  9. 8 git clone https://github.com/sandervanvugt/containers
  10. 9 cd containers/
  11. 10 history
  12. 11 vim /etc/containers/registries.conf
  13. 12 podman run -it alpine
  14. 13 podman ps
  15. 14 podman search ubi9
  16. 15 podman run -it registry.redhat.io/ubi9/ubi
  17. 16 podman login registry.redhat.io
  18. 17 podman run -it registry.redhat.io/ubi9/ubi
  19. 18 podman ps
  20. 19 podman ps -a
  21. 20 podman run -it nginx sh
  22. 21 echo hello
  23. 22 podman ps -a
  24. 23 podman run -it nginx
  25. 24 podman run -it nginx sh
  26. 25 podman ps
  27. 26 podman run -it nginx sh
  28. 27 podman ps
  29. 28 podman exec -it 739 sh
  30. 29 podman ps
  31. 30 history
  32. 31 podman ps
  33. 32 podman stop f78
  34. 33 podman ps
  35. 34 podman ps -a
  36. 35 podman start objective_jang
  37. 36 podman ps
  38. 37 find / -name "f781*" 2>/dev/null
  39. 38 du -hs /var/lib/containers
  40. 39 podman run -d mariadb
  41. 40 podman ps
  42. 41 podman ps -a
  43. 42 podman logs bold_keldysh
  44. 43 podman images
  45. 44 podman inspect b8b | less
  46. 45 podman run --help | less
  47. 46 podman run mariadb -e MARIADB_ROOT_PASSWORD=password
  48. 47 podman run -d -e MARIADB_ROOT_PASSWORD=password mariadb
  49. 48 podman ps
  50. 49 podman stats
  51. 50 history
  52. 51 podman container run --name webserver -d -p 8080:80 nginx
  53. 52 podman ps
  54. 53 curl localhost:8080
  55. 54 podman inspect webserver | less
  56. 55 podman run -d -p 8081:80 --memory="128m" nginx
  57. 56 podman stats
  58. 57 history
  59. 58 lscpu
  60. 59 echo 0 > /sys/bus/cpu/devices/cpu1/online
  61. 60 podman run -d --rm -c 512 busybox dd if=/dev/zero of=/dev/null
  62. 61 podman run -d --rm busybox dd if=/dev/zero of=/dev/null
  63. 62 podman run -d -c 4096 --rm busybox dd if=/dev/zero of=/dev/null
  64. 63 top
  65. 64 history
  66. 65 podman stats
  67. 66 man podman-run
  68. 67 killall dd
  69. 68 history
  70. 69 echo 1 > /sys/bus/cpu/devices/cpu1/online
  71. 70 ls
  72. 71 cd dockerfile/
  73. 72 vim Dockerfile
  74. 73 podman build -t centmap .
  75. 74 podman images
  76. 75 podman run centmap:latest
  77. 76 podman run -it centmap:latest sh
  78. 77 vim Dockerfile
  79. 78 podman inspect serene_jang
  80. 79 podman ps
  81. 80 podman inspect webserver
  82. 81 podman run centmap:latest -sn 10.88.0.0/24
  83. 82 cd ..
  84. 83 cd alpmap/
  85. 84 vim Dockerfile
  86. 85 podman build -t alpmap .
  87. 86 podman images
  88. 87 podman run alpmap
  89. 88 podman run -it alpmap sh
  90. 89 history
  91. 90 podman run -d -p 5000:5000 --restart=always --name registry registry:latest
  92. 91 systemctl enable --now podman-restart.service
  93. 92 systemctl enable --now podman.service
  94. 93 podman pull fedora
  95. 94 podman images
  96. 95 podman tag fedora:latest localhost:5000/myfedora
  97. 96 podman images
  98. 97 podman push localhost:5000/myfedora --tls-verify=false
  99. 98 podman rmi fedora:latest
  100. 99 podman images
  101. 100 podman exec -it registry sh
  102. 101 podman rmi myfedora
  103. 102 podman images
  104. 103 podman run -it localhost:5000/myfedora bash
  105. 104 podman run -it localhost:5000/myfedora bash --tls-verify=false
  106. 105 podman run --tls-verify=false -it localhost:5000/myfedora bash
  107. 106 cd
  108. 107 mkdir bind1
  109. 108 podman run --rm -d --name=bind1 --mount type=bind,source=/root/bind1,target=/app nginx:latest
  110. 109 podman exec -it bind1 sh
  111. 110 setenforce permissive
  112. 111 podman run --rm -d --name=bind1 --mount type=bind,source=/root/bind1,target=/app nginx:latest
  113. 112 podman stop bind1
  114. 113 podman run --rm -d --name=bind1 --mount type=bind,source=/root/bind1,target=/app nginx:latest
  115. 114 podman exec -it bind1
  116. 115 podman exec -it bind1 sh
  117. 116 podman ps -a
  118. 117 podman rm bind1
  119. 118 podman rm -f bind1
  120. 119 ls bind1/
  121. 120 history
  122. 121 setenforce enforcing
  123. 122 podman run --rm -dit --name=bind2 -v /root/bind2:/app:Z nginx:latest
  124. 123 mkdir bind2
  125. 124 podman run --rm -dit --name=bind2 -v /root/bind2:/app:Z nginx:latest
  126. 125 podman exec -it bind2 touch /app/bound
  127. 126 ls bind2/
  128. 127 ls -lZ
  129. 128 history
  130. 129 podman network create alpine-net
  131. 130 podman network list
  132. 131 podman network ls
  133. 132 podman network inspect alpine-net
  134. 133 podman run -dit --name alpine1 --network alpine-net ash
  135. 134 podman run -dit --name alpine1 --network alpine-net alpine ash
  136. 135 podman run -dit --name alpine2 --network alpine-net alpine ash
  137. 136 podman run -dit --name alpine3 alpine ash
  138. 137 podman run -dit --name alpine4 --network alpine-net alpine ash
  139. 138 podman network connect podman alpine4
  140. 139 podman container ls
  141. 140 podman inspect alpine-net
  142. 141 podman container attach alpine1
  143. 142 history
  144.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement