Advertisement
sandervanvugt

containers july23

Jul 25th, 2023
107
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 4.05 KB | None | 0 0
  1. PODMAN COMMAND
  2. [student@centos ~]$ history
  3. 1 sudo hostnamectl set-hostname centos.example.com
  4. 2 exit
  5. 3 podman run -d redis
  6. 4 podman run -d docker.io/library/redis
  7. 5 vim /etc/containers/registries.conf
  8. 6 podman search ubi9
  9. 7 podman pull docker.io/redhat/ubi9
  10. 8 podman pull registry.redhat.io/ubi9
  11. 9 podman login registry.redhat.io
  12. 10 podman pull registry.redhat.io/ubi9
  13. 11 podman images
  14. 12 history
  15. 13 podman run fedora
  16. 14 podman ps
  17. 15 podman ps -a
  18. 16 podman run -it fedora
  19. 17 podman ps
  20. 18 podman ps -a
  21. 19 podman exec -it 6207 sh
  22. 20 cat /etc/os-release
  23. 21 uname -r
  24. 22 podman exec -it 6207 sh
  25. 23 history
  26. 24 podman exec -it 6207 sh
  27. 25 docker ps
  28. 26 podman ps
  29. 27 man podman-run
  30. 28 cd containers/
  31. 29 history
  32. 30 podman ps
  33. 31 podman stop tender_mccarthy
  34. 32 podman ps
  35. 33 sudo find . -name "62075c00ece2*"
  36. 34 pwd
  37. 35 cd ..
  38. 36 sudo find . -name "62075c00ece2*"
  39. 37 podman start 6207
  40. 38 podman ps
  41. 39 podman stop 6207
  42. 40 podman rm 6207
  43. 41 sudo find . -name "62075c00ece2*"
  44. 42 podman inspect 832a | less
  45. 43 podman images
  46. 44 podman inspect 7e
  47. 45 podman inspect 7e | less
  48. 46 podman run -d mariadb
  49. 47 podman ps
  50. 48 podman ps -a
  51. 49 podman logs awesome_babbage
  52. 50 podman run -d --env MARIADB_ROOT_PASSWORD=password mariadb
  53. 51 podman ps
  54. 52 podman stats
  55. 53 podman run --name webserver -d -p 8080:80 nginx
  56. 54 curl localhost:8080
  57. 55 podman run -d -p 8081:80 --memory="128m" nginx
  58. 56 podman ps
  59. 57 podman stats
  60. 58 sudo -i
  61. 59 lscpu | less
  62. 60 podman run -d --rm -c 512 busybox dd if=/dev/zero of=/dev/null
  63. 61 podman run -d --rm -c 2048 busybox dd if=/dev/zero of=/dev/null
  64. 62 podman stats
  65. 63 podman ps
  66. 64 top
  67. 65 podman ps
  68. 66 podman stop 237
  69. 67 podman kill c8f
  70. 68 sudo -i
  71. 69 history
  72.  
  73. DOCKER COMMANDSstudent@student-virtual-machine:~$ history
  74. 1 docker run -d nginx
  75. 2 docker login registry.redhat.io
  76. 3 docker pull pull registry.redhat.io/ubi9
  77. 4 docker pull registry.redhat.io/ubi9
  78. 5 man docker-run
  79. 6 docker run -it fedora
  80. 7 docker ps
  81. 8 docker ps -a
  82. 9 sudo apt install git vim -y
  83. 10 git clone https://github.com/sandervanvugt/containers
  84. 11 cd containers/
  85. 12 ls
  86. 13 cd dockerfile/
  87. 14 ls
  88. 15 vim Dockerfile
  89. 16 docker build -t centmap .
  90. 17 docker images
  91. 18 docker run centmap
  92. 19 history
  93. 20 cd ..
  94. 21 ls
  95. 22 cd alpmap/
  96. 23 docker images
  97. 24 ls
  98. 25 vim Dockerfile
  99. 26 docker build -t alpmap .
  100. 27 docker images
  101. 28 docker run alpmap
  102. 29 docker run -it nginx sh
  103. 30 docker run -it alpmap sh
  104. 31 vim Dockerfile
  105. 32 docker build -t alpmap .
  106. 33 docker run -it alpmap sh
  107. 34 docker run -d -p 5000:5000 --restart=always --name registry registry:latest
  108. 35 docker ps
  109. 36 docker pull fedora
  110. 37 docker images
  111. 38 docker tag fedora:latest localhost:5000/myfedora
  112. 39 docker images
  113. 40 docker push localhost:5000/myfedora
  114. 41 docker rmi fedora:latest
  115. 42 docker images
  116. 43 docker rmi localhost:5000/myfedora
  117. 44 docker exec -it registry sh
  118. 45 docker pull localhost:5000/myfedora
  119. 46 docker images
  120. 47 docker tag 1eb localhost:5000/alpmap
  121. 48 docker push localhost:5000/alpmap
  122. 49 cd
  123. 50 mkdir bind1
  124. 51 docker run --rm -d --name=bind1 --mount type=bind,source="$(pwd)"/bind1,target=/app nginx:latest
  125. 52 docker run --rm -dit --name=bind2 -v "$(pwd)"/bind2:/app nginx:latest
  126. 53 ls
  127. 54 docker exec -it bind1 sh
  128. 55 ls /bind1
  129. 56 ls bind1
  130. 57 docker stop bind1
  131. 58 ls bind1
  132. 59 id
  133. 60 #docker run -it --name hacked --privileged -v /:/host ubi9 chroot /host
  134. 61 sudo touch /root/hellofile
  135. 62 docker run -it --name hacked --privileged -v /:/host ubi9 chroot /host
  136. 63 docker run -it --name hacked --privileged -v /:/host busybox chroot /host
  137. 64 history
  138.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement