Advertisement
sandervanvugt

containers may23

May 11th, 2023
119
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 4.62 KB | None | 0 0
  1. ##### ON DOCKER
  2. student@student-virtual-machine:~$ history
  3. 1 docker run -d nginx
  4. 2 docker ps
  5. 3 docker inspect 3fd | less
  6. 4 docker images
  7. 5 docker ps -a
  8. 6 sudo find / -name "43244e03f811*"
  9. 7 sudo cd /var/lib/docker/containers/43244e03f8117ff471d8647eb875df3b062bbb1a3ec91d807db89fed9570f37b
  10. 8 sudo -i
  11. 9 docker rm 432
  12. 10 docker ps -a
  13. 11 sudo -i
  14. 12 history
  15. 13 docker run fedora
  16. 14 docker ps
  17. 15 docker ps -a
  18. 16 docker run -it fedora
  19. 17 docker ps -a
  20. 18 docker run -it alpine
  21. 19 docker ps
  22. 20 docker images
  23. 21 history
  24. 22 docker search nginx
  25. 23 docker stats
  26. 24 history
  27. 25 sudo apt install vim git -y
  28. 26 history
  29. 27 docker images
  30. 28 cd containers/
  31. 29 ls
  32. 30 cd wordpress-mysql/
  33. 31 ls
  34. 32 sudo apt install docker-compose
  35. 33 docker-compose .
  36. 34 docker-compose build -h | less
  37. 35 docker-compose build
  38. 36 docker-compose up
  39. 37 cd
  40. 38 mkdir bind1
  41. 39 docker run --rm -d --name=bind1 --mount type=bind,source=/home/student/bind1,target=/app nginx:latest
  42. 40 touch bind1/hello
  43. 41 docker exec -it bind1 -- ls -l /app/
  44. 42 docker exec -it bind1 ls -l /app/
  45. 43 docker run -it --name heckit --privileged -v /:/hosts ubi9 chroot /host
  46. 44 docker run -it --name heckit --privileged -v /:/hosts fedora chroot /host
  47. 45 docker run -it --name hackit --privileged -v /:/host fedora chroot /host
  48. 46 sudo ls -l /root
  49. 47 cat /etc/passwd
  50. 48 docker run -it --name hackit --privileged -v /:/host fedora chroot /host
  51. 49 docker run -it --name hackitt --privileged -v /:/host fedora chroot /host
  52. 50 history
  53.  
  54. ####ON PODMAN
  55. [student@localhost wordpress-mysql]$ history
  56. 1 podman run nginx
  57. 2 podman run -d nginx
  58. 3 podman ps
  59. 4 sudo dnf install git -y
  60. 5 git clone https://github.com/sandervanvugt/containers
  61. 6 cd containers/
  62. 7 ls
  63. 8 ./countdown 12
  64. 9 podman run -d docker.io/library/nginx
  65. 10 podman ps
  66. 11 sudo dnf update -y
  67. 12 sudo reboot
  68. 13 podman ps
  69. 14 podman ps -a
  70. 15 podman container run --name web_server -d -p 8080:80 nginx
  71. 16 curl localhost:8080
  72. 17 podman run -d -p 8081:80 --memory="128m" nginx
  73. 18 podman ps
  74. 19 podman stats
  75. 20 lscpu | less
  76. 21 sudo -i
  77. 22 docker run -d --rm -c 512 busybox dd if=/dev/zero of=/dev/null
  78. 23 podman run -d --rm -c 512 busybox dd if=/dev/zero of=/dev/null
  79. 24 podman run -d --rm -c 2048 busybox dd if=/dev/zero of=/dev/null
  80. 25 podman stats
  81. 26 podman stop 53
  82. 27 podman kill 681
  83. 28 history
  84. 29 sudo -i
  85. 30 podman run --name mydb -d mariadb
  86. 31 podman ps
  87. 32 podman ps -a
  88. 33 podman logs mydb
  89. 34 history
  90. 35 podman run --name mydb -d --env MARIADB_ROOT_PASSWORD=password mariadb
  91. 36 podman ps -a
  92. 37 podman rm mydb
  93. 38 podman run --name mydb -d --env MARIADB_ROOT_PASSWORD=password mariadb
  94. 39 history
  95. 40 podman images
  96. 41 podman pull centos:7
  97. 42 podman pull centos
  98. 43 less /etc/containers/registries.conf.d/000-shortnames.conf
  99. 44 podman images
  100. 45 podman tag centos:7 centos:oldest
  101. 46 podman images
  102. 47 cd containers/
  103. 48 ls
  104. 49 cd dockerfile/
  105. 50 ls
  106. 51 vim Dockerfile
  107. 52 podman build -t nmap .
  108. 53 podman images
  109. 54 podman run nmap
  110. 55 history
  111. 56 podman run nmap
  112. 57 podman run -it nmap /bin/bash
  113. 58 vim Dockerfile
  114. 59 cd ..
  115. 60 cd alpmap/
  116. 61 ls
  117. 62 vim Dockerfile
  118. 63 podman build -t alpmap .
  119. 64 podman images
  120. 65 podman run alpmap
  121. 66 podman run -it alpmap /bin/bash
  122. 67 cd ..
  123. 68 history
  124. 69 docker run -d --name newnginx nginx
  125. 70 podman run -d --name newnginx nginx
  126. 71 podman ps
  127. 72 podman exec -it newnginx sh
  128. 73 podman ps
  129. 74 podman diff newnginx
  130. 75 podman commit newnginx
  131. 76 podman images
  132. 77 podman tag 4434 nameless:1.0
  133. 78 podman images
  134. 79 echo docker.io/library/nginx
  135. 80 podman run -d -p 5000:5000 --restart=always --name registry registry:latest
  136. 81 podman pull fedora
  137. 82 podman images
  138. 83 podman tag fedora:latest localhost:5000/myfedora
  139. 84 podman push localhost:5000/myfedora
  140. 85 podman tag e090 docker.io/library/sandervanvugt/alpmap:1.0
  141. 86 podman login docker.io
  142. 87 podman push docker.io/library/sandervanvugt/alpmap:1.0
  143. 88 ls
  144. 89 cd wordpress-mysql/
  145. 90 ls
  146. 91 vim docker-compose.yml
  147. 92 sudo dnf install podman-compose
  148. 93 sudo dnf install epel-release
  149. 94 sudo dnf install podman-compose
  150. 95 podman-compose up
  151. 96 history
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement