Advertisement
Guest User

Untitled

a guest
Feb 22nd, 2019
73
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 35.73 KB | None | 0 0
  1. nila:~$ history | grep export
  2. 52 export http_proxy=http://web.proxy.corp.hpecorp.net:8080
  3. 53 export https_proxy=http://web.proxy.corp.hpecorp.net:8080
  4. 55 export http_proxy=http://web-proxy.corp.hpecorp.net:8080
  5. 56 export https_proxy=http://web-proxy.corp.hpecorp.net:8080
  6. 429 history | grep export
  7. nila:~$ export http_proxy=http://web-proxy.corp.hpecorp.net:8080
  8. nila:~$ export https_proxy=http://web-proxy.corp.hpecorp.net:8080
  9. nila:~$ docker container ls
  10. CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
  11. nila:~$ docker images
  12. REPOSITORY TAG IMAGE ID CREATED SIZE
  13. mywebapp 1.1-alpine cdee649cd49e 45 hours ago 124MB
  14. mywebapp alpine cdee649cd49e 45 hours ago 124MB
  15. tecmp18/mywebapp 1.1-alpine cdee649cd49e 45 hours ago 124MB
  16. tecmp18/mywebapp alpine cdee649cd49e 45 hours ago 124MB
  17. mywebapp 1.0-alpine c082b5427820 45 hours ago 124MB
  18. tecmp18/mywebapp 1.0-alpine c082b5427820 45 hours ago 124MB
  19. httpd 2.4.38-alpine ed4a3497e4bd 8 days ago 124MB
  20. httpd alpine ed4a3497e4bd 8 days ago 124MB
  21. wordpress latest 7539ce0f28d0 11 days ago 420MB
  22. nginx latest f09fe80eb0e7 2 weeks ago 109MB
  23. mysql 5.5 50ba61f07d0c 2 weeks ago 205MB
  24. mysql latest 81f094a7e4cc 2 weeks ago 477MB
  25. debian latest d508d16c64cd 2 weeks ago 101MB
  26. nginx alpine b411e34b4606 2 weeks ago 16.1MB
  27. portainer/portainer latest 89c72b64ab63 3 weeks ago 74.2MB
  28. alpine latest caf27325b298 3 weeks ago 5.53MB
  29. phpmyadmin/phpmyadmin latest c6ba363e7c9b 3 weeks ago 166MB
  30. nila:~$ docker search kapacitor
  31. NAME DESCRIPTION STARS OFFICIAL AUTOMATED
  32. kapacitor Kapacitor is an open source framework for pr… 118 [OK]
  33. srini92/influx-kapacitor-udf-files Auto build of influx-kapacitor-udf custom im… 1 [OK]
  34. allen13/kapacitor A templated version of kapacitor that uses d… 0 [OK]
  35. teamidefix/kapacitor-boshdeploymentdeploy-pipeline 0
  36. amd64/kapacitor Kapacitor is an open source framework for pr… 0
  37. teamidefix/kapacitor 0
  38. trollin/kapacitor 0
  39. podshumok/kapacitor 0
  40. andrewscaya/kapacitor Kapacitor is an open source framework for pr… 0
  41. arm32v7/kapacitor Kapacitor is an open source framework for pr… 0
  42. nordstrom/kapacitor 0
  43. flowguard/kapacitor Kapacitor with Morgoth 0 [OK]
  44. appcelerator/kapacitor Influxdata Kapacitor 0 [OK]
  45. jbye/kapacitor Docker container for Kapacitor 0 [OK]
  46. igneoussystems/base-kapacitor Base image for kapacitor 0
  47. xiocode/kapacitor kapacitor 0 [OK]
  48. arm64v8/kapacitor Kapacitor is an open source framework for pr… 0
  49. skidder/kapacitor Kapacitor build with Mux Incident alerting o… 0
  50. ncareol/kapacitor InfluxData Kapacitor conditional startup 0
  51. dil001/kapacitor-arm64 arm64 image of kapacitor 0
  52. worldsensing/kapacitorpy kapacitor with the UDF python scripting enab… 0
  53. xogroup/kapacitor-configmap-listener A shuttle application to move ConfigMaps int… 0
  54. dilgerm/rpi-kapacitor InfluxDB Kapacitor for Raspberry PI 0
  55. napnap75/rpi-kapacitor 0
  56. nexia/kapacitor Influxdata kapacitor 0 [OK]
  57. nila:~$ docker images
  58. REPOSITORY TAG IMAGE ID CREATED SIZE
  59. mywebapp 1.1-alpine cdee649cd49e 45 hours ago 124MB
  60. mywebapp alpine cdee649cd49e 45 hours ago 124MB
  61. tecmp18/mywebapp 1.1-alpine cdee649cd49e 45 hours ago 124MB
  62. tecmp18/mywebapp alpine cdee649cd49e 45 hours ago 124MB
  63. mywebapp 1.0-alpine c082b5427820 46 hours ago 124MB
  64. tecmp18/mywebapp 1.0-alpine c082b5427820 46 hours ago 124MB
  65. httpd 2.4.38-alpine ed4a3497e4bd 8 days ago 124MB
  66. httpd alpine ed4a3497e4bd 8 days ago 124MB
  67. wordpress latest 7539ce0f28d0 12 days ago 420MB
  68. nginx latest f09fe80eb0e7 2 weeks ago 109MB
  69. mysql 5.5 50ba61f07d0c 2 weeks ago 205MB
  70. mysql latest 81f094a7e4cc 2 weeks ago 477MB
  71. debian latest d508d16c64cd 2 weeks ago 101MB
  72. nginx alpine b411e34b4606 2 weeks ago 16.1MB
  73. portainer/portainer latest 89c72b64ab63 3 weeks ago 74.2MB
  74. alpine latest caf27325b298 3 weeks ago 5.53MB
  75. phpmyadmin/phpmyadmin latest c6ba363e7c9b 3 weeks ago 166MB
  76. nila:~$ ls
  77. Desktop app1 index.html mywebapp name.txt
  78. nila:~$ cd app1/
  79. nila:~/app1$ ls
  80. docker-compose.yaml
  81. nila:~/app1$ nano docker-compose.yaml
  82. bash: nano: command not found
  83. nila:~/app1$ cat docker-compose.yaml
  84. version: '3.4'
  85. services:
  86. db:
  87. image: mysql:5.5
  88. volumes:
  89. - dbdata:/var/lib/mysql
  90. environment:
  91. MYSQL_ROOT_PASSWORD: something
  92.  
  93. # debug:
  94. # image: alpine
  95. # stdin_open: true
  96. # tty: true
  97. # volumes:
  98. # - dbdata:/data
  99.  
  100. admin:
  101. image: phpmyadmin/phpmyadmin
  102. environment:
  103. PMA_HOST: db
  104. ports:
  105. - 80
  106.  
  107. website:
  108. image: wordpress
  109. depends_on:
  110. - db
  111. environment:
  112. WORDPRESS_DB_HOST: db
  113. WORDPRESS_DB_PASSWORD: something
  114. ports:
  115. - 32770:80
  116.  
  117.  
  118.  
  119. volumes:
  120. dbdata:
  121. nila:~/app1$ docker image history mywebapp:alpine
  122. IMAGE CREATED CREATED BY SIZE COMMENT
  123. cdee649cd49e 46 hours ago /bin/sh -c #(nop) ADD file:10a6ad76f4b62f092… 132B
  124. c082b5427820 46 hours ago /bin/sh -c #(nop) EXPOSE 80 0B
  125. 2e93efd9f901 46 hours ago /bin/sh -c #(nop) COPY file:f2997875130cf795… 136B
  126. 0f23b5a640a8 46 hours ago /bin/sh -c #(nop) LABEL maintainer=tejas te… 0B
  127. ed4a3497e4bd 8 days ago /bin/sh -c #(nop) CMD ["httpd-foreground"] 0B
  128. <missing> 8 days ago /bin/sh -c #(nop) EXPOSE 80 0B
  129. <missing> 8 days ago /bin/sh -c #(nop) COPY file:8b68ac010cb13f58… 133B
  130. <missing> 8 days ago /bin/sh -c set -eux; runDeps=' apr-dev … 118MB
  131. <missing> 2 weeks ago /bin/sh -c #(nop) ENV APACHE_DIST_URLS=http… 0B
  132. <missing> 2 weeks ago /bin/sh -c #(nop) ENV HTTPD_PATCHES= 0B
  133. <missing> 2 weeks ago /bin/sh -c #(nop) ENV HTTPD_SHA256=7dc65857… 0B
  134. <missing> 2 weeks ago /bin/sh -c #(nop) ENV HTTPD_VERSION=2.4.38 0B
  135. <missing> 2 weeks ago /bin/sh -c #(nop) WORKDIR /usr/local/apache2 0B
  136. <missing> 2 weeks ago /bin/sh -c mkdir -p "$HTTPD_PREFIX" && chow… 0B
  137. <missing> 2 weeks ago /bin/sh -c #(nop) ENV PATH=/usr/local/apach… 0B
  138. <missing> 2 weeks ago /bin/sh -c #(nop) ENV HTTPD_PREFIX=/usr/loc… 0B
  139. <missing> 2 weeks ago /bin/sh -c set -x && addgroup -g 82 -S www-… 4.85kB
  140. <missing> 3 weeks ago /bin/sh -c #(nop) CMD ["/bin/sh"] 0B
  141. <missing> 3 weeks ago /bin/sh -c #(nop) ADD file:2a1fc9351afe35698… 5.53MB
  142. nila:~/app1$ cd ..
  143. nila:~$ ls
  144. Desktop app1 index.html mywebapp name.txt
  145. nila:~$ cp index.html index.php
  146. nila:~$ vi index.php
  147. nila:~$ mousepad index.php
  148. GLib-GIO-Message: 10:09:48.739: Using the 'memory' GSettings backend. Your settings will not be saved or shared with other applications.
  149.  
  150. (mousepad:3141): Gtk-CRITICAL **: 10:09:50.264: gtk_recent_manager_lookup_item: assertion 'GTK_IS_RECENT_MANAGER (manager)' failed
  151.  
  152. (mousepad:3141): Gtk-WARNING **: 10:09:50.285: Could not load a pixbuf from /org/gtk/libgtk/theme/Adwaita/assets/bullet-symbolic.svg.
  153. This may indicate that pixbuf loaders or the mime database could not be found.
  154.  
  155. (mousepad:3141): Gtk-WARNING **: 10:09:56.896: Theme parsing error: <data>:2:29: The style property GtkButton:default-border is deprecated and shouldn't be used anymore. It will be removed in a future version
  156.  
  157. (mousepad:3141): Gtk-WARNING **: 10:09:56.896: Theme parsing error: <data>:3:37: The style property GtkButton:default-outside-border is deprecated and shouldn't be used anymore. It will be removed in a future version
  158.  
  159. (mousepad:3141): Gtk-WARNING **: 10:09:56.897: Theme parsing error: <data>:4:27: The style property GtkButton:inner-border is deprecated and shouldn't be used anymore. It will be removed in a future version
  160.  
  161. (mousepad:3141): Gtk-WARNING **: 10:09:56.897: Theme parsing error: <data>:5:31: The style property GtkWidget:focus-line-width is deprecated and shouldn't be used anymore. It will be removed in a future version
  162.  
  163. (mousepad:3141): Gtk-WARNING **: 10:09:56.897: Theme parsing error: <data>:6:28: The style property GtkWidget:focus-padding is deprecated and shouldn't be used anymore. It will be removed in a future version
  164.  
  165. nila:~$
  166. nila:~$ ls
  167. Desktop app1 index.html index.php mywebapp name.txt
  168. nila:~$ cat index.php
  169. <<!DOCTYPE html>>
  170. <html>
  171. <head>
  172. <meta charset="utf-8">
  173. <meta http-eqiv="X-UA-Compatible" content="IE=edge">
  174. <title>PHP Sample application</title>
  175. <meta name ="viewport" content="width=device-width, intial-scale=1">
  176. >
  177. </head>
  178. <body>
  179. <h1>PHP Sample application</h1>
  180. <p>Hello.</p>
  181. <p>
  182. <?php
  183. echo "Today is: " . date("d/m/Y")
  184. ?>
  185. </p>
  186. </body>
  187. </html>nila:~$ ls
  188. Desktop app1 index.html index.php mywebapp name.txt
  189. nila:~$ cd mywebapp/
  190. nila:~/mywebapp$ ls
  191. Dockerfile.1.0 Dockerfile.1.1 bye.html index.html
  192. nila:~/mywebapp$ vi Dockerfile.1.1
  193. nila:~/mywebapp$ cp Dockerfile.1.0 Dockerfile.1.2
  194. nila:~/mywebapp$ vi Dockerfile.1.2
  195. nila:~/mywebapp$ cd ..
  196. nila:~$ cp index.php mywebapp/
  197. nila:~$ cd mywebapp/
  198. nila:~/mywebapp$ ls
  199. Dockerfile.1.0 Dockerfile.1.1 Dockerfile.1.2 bye.html index.html index.php
  200. nila:~/mywebapp$ docker buildocker image build -f Dockerfile.1.2 -t myphpapp:1.1-apache /home/user1/mywebapp/
  201. unknown shorthand flag: 'f' in -f
  202. See 'docker --help'.
  203.  
  204. Usage: docker [OPTIONS] COMMAND
  205.  
  206. A self-sufficient runtime for containers
  207.  
  208. Options:
  209. --config string Location of client config files (default "/home/user1/.docker")
  210. -D, --debug Enable debug mode
  211. -H, --host list Daemon socket(s) to connect to
  212. -l, --log-level string Set the logging level ("debug"|"info"|"warn"|"error"|"fatal") (default "info")
  213. --tls Use TLS; implied by --tlsverify
  214. --tlscacert string Trust certs signed only by this CA (default "/home/user1/.docker/ca.pem")
  215. --tlscert string Path to TLS certificate file (default "/home/user1/.docker/cert.pem")
  216. --tlskey string Path to TLS key file (default "/home/user1/.docker/key.pem")
  217. --tlsverify Use TLS and verify the remote
  218. -v, --version Print version information and quit
  219.  
  220. Management Commands:
  221. builder Manage builds
  222. checkpoint Manage checkpoints
  223. config Manage Docker configs
  224. container Manage containers
  225. engine Manage the docker engine
  226. image Manage images
  227. manifest Manage Docker image manifests and manifest lists
  228. network Manage networks
  229. node Manage Swarm nodes
  230. plugin Manage plugins
  231. secret Manage Docker secrets
  232. service Manage services
  233. stack Manage Docker stacks
  234. swarm Manage Swarm
  235. system Manage Docker
  236. trust Manage trust on Docker images
  237. volume Manage volumes
  238.  
  239. Commands:
  240. attach Attach local standard input, output, and error streams to a running container
  241. build Build an image from a Dockerfile
  242. commit Create a new image from a container's changes
  243. cp Copy files/folders between a container and the local filesystem
  244. create Create a new container
  245. deploy Deploy a new stack or update an existing stack
  246. diff Inspect changes to files or directories on a container's filesystem
  247. events Get real time events from the server
  248. exec Run a command in a running container
  249. export Export a container's filesystem as a tar archive
  250. history Show the history of an image
  251. images List images
  252. import Import the contents from a tarball to create a filesystem image
  253. info Display system-wide information
  254. inspect Return low-level information on Docker objects
  255. kill Kill one or more running containers
  256. load Load an image from a tar archive or STDIN
  257. login Log in to a Docker registry
  258. logout Log out from a Docker registry
  259. logs Fetch the logs of a container
  260. pause Pause all processes within one or more containers
  261. port List port mappings or a specific mapping for the container
  262. ps List containers
  263. pull Pull an image or a repository from a registry
  264. push Push an image or a repository to a registry
  265. rename Rename a container
  266. restart Restart one or more containers
  267. rm Remove one or more containers
  268. rmi Remove one or more images
  269. run Run a command in a new container
  270. save Save one or more images to a tar archive (streamed to STDOUT by default)
  271. search Search the Docker Hub for images
  272. start Start one or more stopped containers
  273. stats Display a live stream of container(s) resource usage statistics
  274. stop Stop one or more running containers
  275. tag Create a tag TARGET_IMAGE that refers to SOURCE_IMAGE
  276. top Display the running processes of a container
  277. unpause Unpause all processes within one or more containers
  278. update Update configuration of one or more containers
  279. version Show the Docker version information
  280. wait Block until one or more containers stop, then print their exit codes
  281.  
  282. Run 'docker COMMAND --help' for more information on a command.
  283.  
  284. nila:~/mywebapp$ docker image build -f Dockerfile.1.2 -t myphpapp:1.1-apache /home/user1/mywebapp/
  285. Sending build context to Docker daemon 7.168kB
  286. Step 1/3 : FROM php:7.3.2-apache
  287. 7.3.2-apache: Pulling from library/php
  288. 6ae821421a7d: Already exists
  289. 08f3d19635b0: Already exists
  290. dc8a54b8000b: Already exists
  291. b2c1d103db99: Already exists
  292. edfa752aa38a: Already exists
  293. 583d37cbf2f0: Already exists
  294. c7846a240c1d: Already exists
  295. cc0bc6e8c5cf: Pull complete
  296. 43635160a7c0: Pull complete
  297. 56065ffbc975: Pull complete
  298. 3ceca89a6c41: Pull complete
  299. c20c1f22c2a2: Pull complete
  300. 1067d022a98a: Pull complete
  301. Digest: sha256:ae9709d27bfe16844bb424e0805009f285e740c84cc4f28f3dbfad2ae0206807
  302. Status: Downloaded newer image for php:7.3.2-apache
  303. ---> 3b38e3ca9b55
  304. Step 2/3 : COPY index.php /var/www/html/
  305. ---> 2197494be0ba
  306. Step 3/3 : EXPOSE 80
  307. ---> Running in c34371a1cc45
  308. Removing intermediate container c34371a1cc45
  309. ---> 681e52e46f38
  310. Successfully built 681e52e46f38
  311. Successfully tagged myphpapp:1.1-apache
  312. nila:~/mywebapp$ vi Dockerfile.1.2
  313. nila:~/mywebapp$ docker images
  314. REPOSITORY TAG IMAGE ID CREATED SIZE
  315. myphpapp 1.1-apache 681e52e46f38 33 seconds ago 379MB
  316. tecmp18/mywebapp 1.1-alpine cdee649cd49e 47 hours ago 124MB
  317. tecmp18/mywebapp alpine cdee649cd49e 47 hours ago 124MB
  318. mywebapp 1.1-alpine cdee649cd49e 47 hours ago 124MB
  319. mywebapp alpine cdee649cd49e 47 hours ago 124MB
  320. mywebapp 1.0-alpine c082b5427820 47 hours ago 124MB
  321. tecmp18/mywebapp 1.0-alpine c082b5427820 47 hours ago 124MB
  322. httpd 2.4.38-alpine ed4a3497e4bd 8 days ago 124MB
  323. httpd alpine ed4a3497e4bd 8 days ago 124MB
  324. wordpress latest 7539ce0f28d0 12 days ago 420MB
  325. php 7.3.2-apache 3b38e3ca9b55 12 days ago 379MB
  326. nginx latest f09fe80eb0e7 2 weeks ago 109MB
  327. mysql 5.5 50ba61f07d0c 2 weeks ago 205MB
  328. mysql latest 81f094a7e4cc 2 weeks ago 477MB
  329. debian latest d508d16c64cd 2 weeks ago 101MB
  330. nginx alpine b411e34b4606 2 weeks ago 16.1MB
  331. portainer/portainer latest 89c72b64ab63 3 weeks ago 74.2MB
  332. alpine latest caf27325b298 3 weeks ago 5.53MB
  333. phpmyadmin/phpmyadmin latest c6ba363e7c9b 3 weeks ago 166MB
  334. nila:~/mywebapp$ docker container start myphpapp:1.1-apache
  335. Error response from daemon: No such container: myphpapp:1.1-apache
  336. Error: failed to start containers: myphpapp:1.1-apache
  337. nila:~/mywebapp$ docker container ls
  338. CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
  339. nila:~/mywebapp$ docker container create
  340. "docker container create" requires at least 1 argument.
  341. See 'docker container create --help'.
  342.  
  343. Usage: docker container create [OPTIONS] IMAGE [COMMAND] [ARG...]
  344.  
  345. Create a new container
  346. nila:~/mywebapp$ docker container create myphpapp:1.1-apache
  347. de643571074bfc551994d59055628780ad19f76ed4f8a20caed240b9e9c6586a
  348. nila:~/mywebapp$ docker container start myphpapp:1.1-apache
  349. Error response from daemon: No such container: myphpapp:1.1-apache
  350. Error: failed to start containers: myphpapp:1.1-apache
  351. nila:~/mywebapp$ docker container ls
  352. CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
  353. nila:~/mywebapp$ docker container ls -a
  354. CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
  355. de643571074b myphpapp:1.1-apache "docker-php-entrypoi…" 18 seconds ago Created wizardly_hypatia
  356. 1c1f29fd221d phpmyadmin/phpmyadmin "/run.sh supervisord…" 2 days ago Exited (0) 45 hours ago dbc1
  357. 28338efc1bae mysql:5.5 "docker-entrypoint.s…" 2 days ago Exited (0) 45 hours ago db1
  358. a3088f871b1e debian "bash" 2 days ago Exited (255) 2 hours ago d1
  359. 0d1c7e619f39 alpine "/bin/sh" 2 days ago Exited (137) 2 days ago b1
  360. fea7a2e79f8b alpine "/bin/sh" 2 days ago Exited (137) 2 days ago v3
  361. ce1021453d8f alpine "/bin/sh" 2 days ago Exited (137) 2 days ago v2
  362. cc72dfb4a354 alpine "/bin/sh" 2 days ago Exited (137) 2 days ago v1
  363. 17b9749c0b06 nginx:alpine "nginx -g 'daemon of…" 2 days ago Exited (0) 2 days ago pws2
  364. 075b53d202dc nginx:alpine "nginx -g 'daemon of…" 2 days ago Exited (255) 2 days ago 80/tcp pws1
  365. b4fa01fa1944 alpine "/bin/sh" 2 days ago Exited (255) 2 days ago pc2
  366. e36fe53cc757 alpine "/bin/sh" 2 days ago Exited (255) 2 days ago pc1
  367. a6c7c68a9e2f alpine "/bin/sh" 2 days ago Exited (137) 2 days ago C5
  368. 5b038f5822af nginx:alpine "nginx -g 'daemon of…" 2 days ago Exited (0) 2 days ago S1
  369. 007d74a13662 alpine "sleep 5m" 2 days ago Exited (0) 2 days ago C3
  370. fc3adcb952b2 alpine "/bin/sh" 2 days ago Exited (137) 2 days ago C1
  371. e09e9835e79f nginx:alpine "nginx -g 'daemon of…" 2 days ago Exited (255) 2 days ago 80/tcp wonderful_borg
  372. nila:~/mywebapp$ docker container start docker image build -f Dockerfile.1.1 -t mywebapp:1.1-alpine /home/user1/mywebapp/
  373. unknown shorthand flag: 'f' in -f
  374. See 'docker container start --help'.
  375. nila:~/mywebapp$ docker container start wizardly_hypatia
  376. wizardly_hypatia
  377. nila:~/mywebapp$ docker container ls -a
  378. CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
  379. de643571074b myphpapp:1.1-apache "docker-php-entrypoi…" About a minute ago Up 4 seconds 80/tcp wizardly_hypatia
  380. 1c1f29fd221d phpmyadmin/phpmyadmin "/run.sh supervisord…" 2 days ago Exited (0) 45 hours ago dbc1
  381. 28338efc1bae mysql:5.5 "docker-entrypoint.s…" 2 days ago Exited (0) 45 hours ago db1
  382. a3088f871b1e debian "bash" 2 days ago Exited (255) 2 hours ago d1
  383. 0d1c7e619f39 alpine "/bin/sh" 2 days ago Exited (137) 2 days ago b1
  384. fea7a2e79f8b alpine "/bin/sh" 2 days ago Exited (137) 2 days ago v3
  385. ce1021453d8f alpine "/bin/sh" 2 days ago Exited (137) 2 days ago v2
  386. cc72dfb4a354 alpine "/bin/sh" 2 days ago Exited (137) 2 days ago v1
  387. 17b9749c0b06 nginx:alpine "nginx -g 'daemon of…" 2 days ago Exited (0) 2 days ago pws2
  388. 075b53d202dc nginx:alpine "nginx -g 'daemon of…" 2 days ago Exited (255) 2 days ago 80/tcp pws1
  389. b4fa01fa1944 alpine "/bin/sh" 2 days ago Exited (255) 2 days ago pc2
  390. e36fe53cc757 alpine "/bin/sh" 2 days ago Exited (255) 2 days ago pc1
  391. a6c7c68a9e2f alpine "/bin/sh" 2 days ago Exited (137) 2 days ago C5
  392. 5b038f5822af nginx:alpine "nginx -g 'daemon of…" 2 days ago Exited (0) 2 days ago S1
  393. 007d74a13662 alpine "sleep 5m" 2 days ago Exited (0) 2 days ago C3
  394. fc3adcb952b2 alpine "/bin/sh" 2 days ago Exited (137) 2 days ago C1
  395. e09e9835e79f nginx:alpine "nginx -g 'daemon of…" 2 days ago Exited (255) 2 days ago 80/tcp wonderful_borg
  396. nila:~/mywebapp$ docker container ls
  397. CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
  398. de643571074b myphpapp:1.1-apache "docker-php-entrypoi…" About a minute ago Up 7 seconds 80/tcp wizardly_hypatia
  399. nila:~/mywebapp$ docker container stop wizardly_hypatia
  400. wizardly_hypatia
  401. nila:~/mywebapp$ docker container rm myphpapp:1.1-apache
  402. Error: No such container: myphpapp:1.1-apache
  403. nila:~/mywebapp$ docker container rm wizardly_hypatia
  404. wizardly_hypatia
  405. nila:~/mywebapp$ docker container create -h php --name php -p 8080:80 myphpapp:1.1-apache
  406. 16a477d97e6ae04ba3a272871baa9e293e9377e73424ad82140d16ed178b9312
  407. nila:~/mywebapp$ docker container start php
  408. php
  409. nila:~/mywebapp$ docker container ls
  410. CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
  411. 16a477d97e6a myphpapp:1.1-apache "docker-php-entrypoi…" 17 seconds ago Up 5 seconds 0.0.0.0:8080->80/tcp php
  412. nila:~/mywebapp$ cd ..
  413. nila:~$ mkdir nodejs
  414. nila:~$ cp mywebapp/Dockerfile.1.2 nodejs/
  415. nila:~$ cd nodejs/
  416. nila:~/nodejs$ ls
  417. Dockerfile.1.2
  418. nila:~/nodejs$ mv Dockerfile.1.2 Dockerfile.1.3
  419. nila:~/nodejs$ vi Dockerfile.1.3
  420. nila:~/nodejs$ vi Dockerfile.1.3
  421. nila:~/nodejs$ export http_proxy=http://web-proxy.in.hpecorp.net:8080
  422. nila:~/nodejs$ wget http://bit.ly/d2-nodesample
  423. Connecting to web-proxy.in.hpecorp.net:8080 (16.167.28.210:8080)
  424. wget: server returned error: HTTP/1.1 400 Bad Request
  425. nila:~/nodejs$ export http_proxy=http://web-proxy.corp.hpecorp.net:8080
  426. nila:~/nodejs$ ls
  427. Dockerfile.1.3
  428. nila:~/nodejs$ wget http://bit.ly/d2-nodesample
  429. Connecting to web-proxy.corp.hpecorp.net:8080 (16.85.88.10:8080)
  430. wget: server returned error: HTTP/1.1 400 Bad Request
  431. nila:~/nodejs$ export http_proxy=http://web-proxy.in.hpecorp.net:8080
  432. nila:~/nodejs$ wget http://bit.ly/d2-nodesample
  433. Connecting to web-proxy.in.hpecorp.net:8080 (16.167.28.210:8080)
  434. wget: server returned error: HTTP/1.1 400 Bad Request
  435. nila:~/nodejs$ df -kh
  436. Filesystem Size Used Available Use% Mounted on
  437. devtmpfs 10.0M 0 10.0M 0% /dev
  438. shm 1.9G 2.3M 1.9G 0% /dev/shm
  439. /dev/sda3 15.6G 2.8G 12.0G 19% /
  440. tmpfs 394.8M 376.0K 394.4M 0% /run
  441. /dev/sda1 92.8M 13.3M 72.6M 15% /boot
  442. /dev/sda3 15.6G 2.8G 12.0G 19% /var/lib/docker
  443. none 1.9G 0 1.9G 0% /run/user/1000
  444. df: /var/lib/docker/overlay2/74bf2769c1abf6d004d302c60cd3989dcade0373b42cb475cad66c5e91ed30bd/merged: Permission denied
  445. df: /var/lib/docker/containers/16a477d97e6ae04ba3a272871baa9e293e9377e73424ad82140d16ed178b9312/mounts/shm: Permission denied
  446. df: /run/docker/netns/d51d30def080: Permission denied
  447. nila:~/nodejs$ df -kh
  448. Filesystem Size Used Available Use% Mounted on
  449. devtmpfs 10.0M 0 10.0M 0% /dev
  450. shm 1.9G 2.3M 1.9G 0% /dev/shm
  451. /dev/sda3 15.6G 2.8G 12.0G 19% /
  452. tmpfs 394.8M 376.0K 394.4M 0% /run
  453. /dev/sda1 92.8M 13.3M 72.6M 15% /boot
  454. /dev/sda3 15.6G 2.8G 12.0G 19% /var/lib/docker
  455. none 1.9G 0 1.9G 0% /run/user/1000
  456. df: /var/lib/docker/overlay2/74bf2769c1abf6d004d302c60cd3989dcade0373b42cb475cad66c5e91ed30bd/merged: Permission denied
  457. df: /var/lib/docker/containers/16a477d97e6ae04ba3a272871baa9e293e9377e73424ad82140d16ed178b9312/mounts/shm: Permission denied
  458. df: /run/docker/netns/d51d30def080: Permission denied
  459. nila:~/nodejs$ sudo su
  460. [sudo] password for user1:
  461. nila:/home/user1/nodejs# whoami
  462. root
  463. nila:/home/user1/nodejs# cd /etc/profile.d/
  464. nila:/etc/profile.d# ls
  465. bash_completion.sh color_prompt vte.sh
  466. nila:/etc/profile.d# vi proxy.sh
  467. nila:/etc/profile.d# vi proxy.sh
  468. nila:/etc/profile.d# exit
  469. nila:~/nodejs$
  470.  
  471. nila:~$ env
  472. XDG_MENU_PREFIX=xfce-
  473. DISPLAY=:0.0
  474. COLORTERM=truecolor
  475. EINFO_LOG=/etc/init.d/lxdm
  476. SSH_AUTH_SOCK=/tmp/ssh-6XxO0VAMRoOg/agent.4719
  477. GLADE_CATALOG_PATH=:
  478. USER=user1
  479. GLADE_MODULE_PATH=:
  480. PAGER=less
  481. DESKTOP_SESSION=xfce
  482. RC_SERVICE=/etc/init.d/lxdm
  483. PWD=/home/user1
  484. HOME=/home/user1
  485. SSH_AGENT_PID=4720
  486. https_proxy=http://web-proxy.in.hpecorp.net:8080
  487. XDG_DATA_DIRS=/usr/local/share:/usr/share
  488. CHARSET=UTF-8
  489. http_proxy=http://web-proxy.in.hpecorp.net:8080
  490. no_proxy=localhost
  491. GLADE_PIXMAP_PATH=:
  492. TERM=xterm-256color
  493. SHELL=/bin/bash
  494. VTE_VERSION=5202
  495. XDG_CURRENT_DESKTOP=XFCE
  496. SHLVL=6
  497. WINDOWID=27262979
  498. LOGNAME=user1
  499. DBUS_SESSION_BUS_ADDRESS=unix:abstract=/tmp/dbus-5jFYHRfFDv,guid=ad97088ea715fffe3f8642495c6e3a14
  500. XAUTHORITY=/home/user1/.Xauthority
  501. RC_SVCNAME=lxdm
  502. XDG_CONFIG_DIRS=/etc/xdg
  503. PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
  504. PS1=\h:\w\$
  505. XDG_SESSION_COOKIE=nila-1550727700.388787-119490857
  506. SESSION_MANAGER=local/nila:@/tmp/.ICE-unix/4695,unix/nila:/tmp/.ICE-unix/4695
  507. SVCNAME=lxdm
  508. _=/usr/bin/env
  509. nila:~$ chromium-browser --proxy-server $https_proxy
  510. Opening in existing browser session.
  511. nila:~$ pwd
  512. /home/user1
  513. nila:~$ cd Downloads/
  514. nila:~/Downloads$ ls
  515. package.json server.js
  516. nila:~/Downloads$ cp package.json server.js /home/user1/
  517. .ICEauthority .cache/ .local/ Downloads/ mywebapp/
  518. .Xauthority .config/ .pki/ app1/ name.txt
  519. .ash_history .dbus/ .xsession-errors index.html nodejs/
  520. .bash_history .docker/ Desktop/ index.php
  521. nila:~/Downloads$ cp package.json server.js /home/user1/nodejs/
  522. nila:~/Downloads$ ls
  523. package.json server.js
  524. nila:~/Downloads$ cd ..
  525. nila:~$ cd nodejs/
  526. nila:~/nodejs$ ls
  527. Dockerfile.1.3 package.json server.js
  528. nila:~/nodejs$ vi Dockerfile.1.3
  529. nila:~/nodejs$ vi Dockerfile.1.3
  530. nila:~/nodejs$ docker container start docker image build -f Dockerfile.1.3 -t nodejs:1.0-alpine /home/user1/mywebapp/nodejs
  531. unknown shorthand flag: 'f' in -f
  532. See 'docker container start --help'.
  533. nila:~/nodejs$ docker image build -f Dockerfile.1.3 -t nodejs:1.0-alpine /home/user1/mywebapp/nodejs
  534. unable to prepare context: path "/home/user1/mywebapp/nodejs" not found
  535. nila:~/nodejs$ pwd
  536. /home/user1/nodejs
  537. nila:~/nodejs$ docker image build -f Dockerfile.1.3 -t nodejs:1.0-alpine /home/user1/nodejs
  538. Sending build context to Docker daemon 4.096kB
  539. Step 1/9 : FROM node:8.15.0-alpine
  540. 8.15.0-alpine: Pulling from library/node
  541. 169185f82c45: Pull complete
  542. 62154f231947: Pull complete
  543. acf10a8404b6: Pull complete
  544. Digest: sha256:812e5a88e7dc8e8d9011f18a864d2fd7da4d85b6d77c545b71a73b13c1f4993e
  545. Status: Downloaded newer image for node:8.15.0-alpine
  546. ---> e8ae960eaa9e
  547. Step 2/9 : LABEL maintainer "Nodejs App"
  548. ---> Running in 6e55f766e97c
  549. Removing intermediate container 6e55f766e97c
  550. ---> dc87b99eb6f4
  551. Step 3/9 : WORKDIR /app
  552. ---> Running in f38507c1f221
  553. Removing intermediate container f38507c1f221
  554. ---> 2d5182fa0477
  555. Step 4/9 : COPY server.js .
  556. ---> 8f9312523930
  557. Step 5/9 : COPY package.json .
  558. ---> 9638e6b10f80
  559. Step 6/9 : RUN npm install
  560. ---> Running in 2bbfd9c0e69a
  561. ^Z
  562. [1]+ Stopped docker image build -f Dockerfile.1.3 -t nodejs:1.0-alpine /home/user1/nodejs
  563. nila:~/nodejs$ vi Dockerfile.1.3
  564. nila:~/nodejs$ docker image build -f Dockerfile.1.3 -t nodejs:1.0-alpine /home/user1/nodejs
  565. Sending build context to Docker daemon 4.096kB
  566. Step 1/11 : FROM node:8.15.0-alpine
  567. ---> e8ae960eaa9e
  568. Step 2/11 : LABEL maintainer "Nodejs App"
  569. ---> Using cache
  570. ---> dc87b99eb6f4
  571. Step 3/11 : WORKDIR /app
  572. ---> Using cache
  573. ---> 2d5182fa0477
  574. Step 4/11 : COPY server.js .
  575. ---> Using cache
  576. ---> 8f9312523930
  577. Step 5/11 : COPY package.json .
  578. ---> Using cache
  579. ---> 9638e6b10f80
  580. Step 6/11 : ENV http_proxy=http://web-proxy.in.hpecorp.net:8080
  581. ---> Running in 10817d552dd9
  582. Removing intermediate container 10817d552dd9
  583. ---> cfa7ef73b83e
  584. Step 7/11 : ENV https_proxy=http://web-proxy.in.hpecorp.net:8080
  585. ---> Running in 2611ef612184
  586. Removing intermediate container 2611ef612184
  587. ---> 937b2afa0d9c
  588. Step 8/11 : RUN npm install
  589. ---> Running in 3b815ecc5bc8
  590. npm notice created a lockfile as package-lock.json. You should commit this file.
  591. npm WARN sampleapp@1.0.0 No repository field.
  592.  
  593. added 48 packages from 36 contributors and audited 121 packages in 19.433s
  594. found 0 vulnerabilities
  595.  
  596. Removing intermediate container 3b815ecc5bc8
  597. ---> 5991a260a124
  598. Step 9/11 : EXPOSE 8080
  599. ---> Running in 9beefb6fca2f
  600. Removing intermediate container 9beefb6fca2f
  601. ---> ea4cb07d38ec
  602. Step 10/11 : CMD ["server.js"]
  603. ---> Running in 7e5a8bed3201
  604. Removing intermediate container 7e5a8bed3201
  605. ---> 4fff367fa8b6
  606. Step 11/11 : ENTRYPOINT ["node"]
  607. ---> Running in d427357cf42d
  608. Removing intermediate container d427357cf42d
  609. ---> 3ab604b75e8b
  610. Successfully built 3ab604b75e8b
  611. Successfully tagged nodejs:1.0-alpine
  612. nila:~/nodejs$ docker container create -h nodejs --name nodejs -p 8090:8080 nodejs:1.0-alpine
  613. fe38a5a9c197e629975811ae507123587dbfd5dcf2c3a1129d1942189ef52ce8
  614. nila:~/nodejs$ docker container start nodejs
  615. nodejs
  616. nila:~/nodejs$
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement