Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- nila:~$ history | grep export
- 52 export http_proxy=http://web.proxy.corp.hpecorp.net:8080
- 53 export https_proxy=http://web.proxy.corp.hpecorp.net:8080
- 55 export http_proxy=http://web-proxy.corp.hpecorp.net:8080
- 56 export https_proxy=http://web-proxy.corp.hpecorp.net:8080
- 429 history | grep export
- nila:~$ export http_proxy=http://web-proxy.corp.hpecorp.net:8080
- nila:~$ export https_proxy=http://web-proxy.corp.hpecorp.net:8080
- nila:~$ docker container ls
- CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
- nila:~$ docker images
- REPOSITORY TAG IMAGE ID CREATED SIZE
- mywebapp 1.1-alpine cdee649cd49e 45 hours ago 124MB
- mywebapp alpine cdee649cd49e 45 hours ago 124MB
- tecmp18/mywebapp 1.1-alpine cdee649cd49e 45 hours ago 124MB
- tecmp18/mywebapp alpine cdee649cd49e 45 hours ago 124MB
- mywebapp 1.0-alpine c082b5427820 45 hours ago 124MB
- tecmp18/mywebapp 1.0-alpine c082b5427820 45 hours ago 124MB
- httpd 2.4.38-alpine ed4a3497e4bd 8 days ago 124MB
- httpd alpine ed4a3497e4bd 8 days ago 124MB
- wordpress latest 7539ce0f28d0 11 days ago 420MB
- nginx latest f09fe80eb0e7 2 weeks ago 109MB
- mysql 5.5 50ba61f07d0c 2 weeks ago 205MB
- mysql latest 81f094a7e4cc 2 weeks ago 477MB
- debian latest d508d16c64cd 2 weeks ago 101MB
- nginx alpine b411e34b4606 2 weeks ago 16.1MB
- portainer/portainer latest 89c72b64ab63 3 weeks ago 74.2MB
- alpine latest caf27325b298 3 weeks ago 5.53MB
- phpmyadmin/phpmyadmin latest c6ba363e7c9b 3 weeks ago 166MB
- nila:~$ docker search kapacitor
- NAME DESCRIPTION STARS OFFICIAL AUTOMATED
- kapacitor Kapacitor is an open source framework for pr… 118 [OK]
- srini92/influx-kapacitor-udf-files Auto build of influx-kapacitor-udf custom im… 1 [OK]
- allen13/kapacitor A templated version of kapacitor that uses d… 0 [OK]
- teamidefix/kapacitor-boshdeploymentdeploy-pipeline 0
- amd64/kapacitor Kapacitor is an open source framework for pr… 0
- teamidefix/kapacitor 0
- trollin/kapacitor 0
- podshumok/kapacitor 0
- andrewscaya/kapacitor Kapacitor is an open source framework for pr… 0
- arm32v7/kapacitor Kapacitor is an open source framework for pr… 0
- nordstrom/kapacitor 0
- flowguard/kapacitor Kapacitor with Morgoth 0 [OK]
- appcelerator/kapacitor Influxdata Kapacitor 0 [OK]
- jbye/kapacitor Docker container for Kapacitor 0 [OK]
- igneoussystems/base-kapacitor Base image for kapacitor 0
- xiocode/kapacitor kapacitor 0 [OK]
- arm64v8/kapacitor Kapacitor is an open source framework for pr… 0
- skidder/kapacitor Kapacitor build with Mux Incident alerting o… 0
- ncareol/kapacitor InfluxData Kapacitor conditional startup 0
- dil001/kapacitor-arm64 arm64 image of kapacitor 0
- worldsensing/kapacitorpy kapacitor with the UDF python scripting enab… 0
- xogroup/kapacitor-configmap-listener A shuttle application to move ConfigMaps int… 0
- dilgerm/rpi-kapacitor InfluxDB Kapacitor for Raspberry PI 0
- napnap75/rpi-kapacitor 0
- nexia/kapacitor Influxdata kapacitor 0 [OK]
- nila:~$ docker images
- REPOSITORY TAG IMAGE ID CREATED SIZE
- mywebapp 1.1-alpine cdee649cd49e 45 hours ago 124MB
- mywebapp alpine cdee649cd49e 45 hours ago 124MB
- tecmp18/mywebapp 1.1-alpine cdee649cd49e 45 hours ago 124MB
- tecmp18/mywebapp alpine cdee649cd49e 45 hours ago 124MB
- mywebapp 1.0-alpine c082b5427820 46 hours ago 124MB
- tecmp18/mywebapp 1.0-alpine c082b5427820 46 hours ago 124MB
- httpd 2.4.38-alpine ed4a3497e4bd 8 days ago 124MB
- httpd alpine ed4a3497e4bd 8 days ago 124MB
- wordpress latest 7539ce0f28d0 12 days ago 420MB
- nginx latest f09fe80eb0e7 2 weeks ago 109MB
- mysql 5.5 50ba61f07d0c 2 weeks ago 205MB
- mysql latest 81f094a7e4cc 2 weeks ago 477MB
- debian latest d508d16c64cd 2 weeks ago 101MB
- nginx alpine b411e34b4606 2 weeks ago 16.1MB
- portainer/portainer latest 89c72b64ab63 3 weeks ago 74.2MB
- alpine latest caf27325b298 3 weeks ago 5.53MB
- phpmyadmin/phpmyadmin latest c6ba363e7c9b 3 weeks ago 166MB
- nila:~$ ls
- Desktop app1 index.html mywebapp name.txt
- nila:~$ cd app1/
- nila:~/app1$ ls
- docker-compose.yaml
- nila:~/app1$ nano docker-compose.yaml
- bash: nano: command not found
- nila:~/app1$ cat docker-compose.yaml
- version: '3.4'
- services:
- db:
- image: mysql:5.5
- volumes:
- - dbdata:/var/lib/mysql
- environment:
- MYSQL_ROOT_PASSWORD: something
- # debug:
- # image: alpine
- # stdin_open: true
- # tty: true
- # volumes:
- # - dbdata:/data
- admin:
- image: phpmyadmin/phpmyadmin
- environment:
- PMA_HOST: db
- ports:
- - 80
- website:
- image: wordpress
- depends_on:
- - db
- environment:
- WORDPRESS_DB_HOST: db
- WORDPRESS_DB_PASSWORD: something
- ports:
- - 32770:80
- volumes:
- dbdata:
- nila:~/app1$ docker image history mywebapp:alpine
- IMAGE CREATED CREATED BY SIZE COMMENT
- cdee649cd49e 46 hours ago /bin/sh -c #(nop) ADD file:10a6ad76f4b62f092… 132B
- c082b5427820 46 hours ago /bin/sh -c #(nop) EXPOSE 80 0B
- 2e93efd9f901 46 hours ago /bin/sh -c #(nop) COPY file:f2997875130cf795… 136B
- 0f23b5a640a8 46 hours ago /bin/sh -c #(nop) LABEL maintainer=tejas te… 0B
- ed4a3497e4bd 8 days ago /bin/sh -c #(nop) CMD ["httpd-foreground"] 0B
- <missing> 8 days ago /bin/sh -c #(nop) EXPOSE 80 0B
- <missing> 8 days ago /bin/sh -c #(nop) COPY file:8b68ac010cb13f58… 133B
- <missing> 8 days ago /bin/sh -c set -eux; runDeps=' apr-dev … 118MB
- <missing> 2 weeks ago /bin/sh -c #(nop) ENV APACHE_DIST_URLS=http… 0B
- <missing> 2 weeks ago /bin/sh -c #(nop) ENV HTTPD_PATCHES= 0B
- <missing> 2 weeks ago /bin/sh -c #(nop) ENV HTTPD_SHA256=7dc65857… 0B
- <missing> 2 weeks ago /bin/sh -c #(nop) ENV HTTPD_VERSION=2.4.38 0B
- <missing> 2 weeks ago /bin/sh -c #(nop) WORKDIR /usr/local/apache2 0B
- <missing> 2 weeks ago /bin/sh -c mkdir -p "$HTTPD_PREFIX" && chow… 0B
- <missing> 2 weeks ago /bin/sh -c #(nop) ENV PATH=/usr/local/apach… 0B
- <missing> 2 weeks ago /bin/sh -c #(nop) ENV HTTPD_PREFIX=/usr/loc… 0B
- <missing> 2 weeks ago /bin/sh -c set -x && addgroup -g 82 -S www-… 4.85kB
- <missing> 3 weeks ago /bin/sh -c #(nop) CMD ["/bin/sh"] 0B
- <missing> 3 weeks ago /bin/sh -c #(nop) ADD file:2a1fc9351afe35698… 5.53MB
- nila:~/app1$ cd ..
- nila:~$ ls
- Desktop app1 index.html mywebapp name.txt
- nila:~$ cp index.html index.php
- nila:~$ vi index.php
- nila:~$ mousepad index.php
- GLib-GIO-Message: 10:09:48.739: Using the 'memory' GSettings backend. Your settings will not be saved or shared with other applications.
- (mousepad:3141): Gtk-CRITICAL **: 10:09:50.264: gtk_recent_manager_lookup_item: assertion 'GTK_IS_RECENT_MANAGER (manager)' failed
- (mousepad:3141): Gtk-WARNING **: 10:09:50.285: Could not load a pixbuf from /org/gtk/libgtk/theme/Adwaita/assets/bullet-symbolic.svg.
- This may indicate that pixbuf loaders or the mime database could not be found.
- (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
- (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
- (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
- (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
- (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
- nila:~$
- nila:~$ ls
- Desktop app1 index.html index.php mywebapp name.txt
- nila:~$ cat index.php
- <<!DOCTYPE html>>
- <html>
- <head>
- <meta charset="utf-8">
- <meta http-eqiv="X-UA-Compatible" content="IE=edge">
- <title>PHP Sample application</title>
- <meta name ="viewport" content="width=device-width, intial-scale=1">
- >
- </head>
- <body>
- <h1>PHP Sample application</h1>
- <p>Hello.</p>
- <p>
- <?php
- echo "Today is: " . date("d/m/Y")
- ?>
- </p>
- </body>
- </html>nila:~$ ls
- Desktop app1 index.html index.php mywebapp name.txt
- nila:~$ cd mywebapp/
- nila:~/mywebapp$ ls
- Dockerfile.1.0 Dockerfile.1.1 bye.html index.html
- nila:~/mywebapp$ vi Dockerfile.1.1
- nila:~/mywebapp$ cp Dockerfile.1.0 Dockerfile.1.2
- nila:~/mywebapp$ vi Dockerfile.1.2
- nila:~/mywebapp$ cd ..
- nila:~$ cp index.php mywebapp/
- nila:~$ cd mywebapp/
- nila:~/mywebapp$ ls
- Dockerfile.1.0 Dockerfile.1.1 Dockerfile.1.2 bye.html index.html index.php
- nila:~/mywebapp$ docker buildocker image build -f Dockerfile.1.2 -t myphpapp:1.1-apache /home/user1/mywebapp/
- unknown shorthand flag: 'f' in -f
- See 'docker --help'.
- Usage: docker [OPTIONS] COMMAND
- A self-sufficient runtime for containers
- Options:
- --config string Location of client config files (default "/home/user1/.docker")
- -D, --debug Enable debug mode
- -H, --host list Daemon socket(s) to connect to
- -l, --log-level string Set the logging level ("debug"|"info"|"warn"|"error"|"fatal") (default "info")
- --tls Use TLS; implied by --tlsverify
- --tlscacert string Trust certs signed only by this CA (default "/home/user1/.docker/ca.pem")
- --tlscert string Path to TLS certificate file (default "/home/user1/.docker/cert.pem")
- --tlskey string Path to TLS key file (default "/home/user1/.docker/key.pem")
- --tlsverify Use TLS and verify the remote
- -v, --version Print version information and quit
- Management Commands:
- builder Manage builds
- checkpoint Manage checkpoints
- config Manage Docker configs
- container Manage containers
- engine Manage the docker engine
- image Manage images
- manifest Manage Docker image manifests and manifest lists
- network Manage networks
- node Manage Swarm nodes
- plugin Manage plugins
- secret Manage Docker secrets
- service Manage services
- stack Manage Docker stacks
- swarm Manage Swarm
- system Manage Docker
- trust Manage trust on Docker images
- volume Manage volumes
- Commands:
- attach Attach local standard input, output, and error streams to a running container
- build Build an image from a Dockerfile
- commit Create a new image from a container's changes
- cp Copy files/folders between a container and the local filesystem
- create Create a new container
- deploy Deploy a new stack or update an existing stack
- diff Inspect changes to files or directories on a container's filesystem
- events Get real time events from the server
- exec Run a command in a running container
- export Export a container's filesystem as a tar archive
- history Show the history of an image
- images List images
- import Import the contents from a tarball to create a filesystem image
- info Display system-wide information
- inspect Return low-level information on Docker objects
- kill Kill one or more running containers
- load Load an image from a tar archive or STDIN
- login Log in to a Docker registry
- logout Log out from a Docker registry
- logs Fetch the logs of a container
- pause Pause all processes within one or more containers
- port List port mappings or a specific mapping for the container
- ps List containers
- pull Pull an image or a repository from a registry
- push Push an image or a repository to a registry
- rename Rename a container
- restart Restart one or more containers
- rm Remove one or more containers
- rmi Remove one or more images
- run Run a command in a new container
- save Save one or more images to a tar archive (streamed to STDOUT by default)
- search Search the Docker Hub for images
- start Start one or more stopped containers
- stats Display a live stream of container(s) resource usage statistics
- stop Stop one or more running containers
- tag Create a tag TARGET_IMAGE that refers to SOURCE_IMAGE
- top Display the running processes of a container
- unpause Unpause all processes within one or more containers
- update Update configuration of one or more containers
- version Show the Docker version information
- wait Block until one or more containers stop, then print their exit codes
- Run 'docker COMMAND --help' for more information on a command.
- nila:~/mywebapp$ docker image build -f Dockerfile.1.2 -t myphpapp:1.1-apache /home/user1/mywebapp/
- Sending build context to Docker daemon 7.168kB
- Step 1/3 : FROM php:7.3.2-apache
- 7.3.2-apache: Pulling from library/php
- 6ae821421a7d: Already exists
- 08f3d19635b0: Already exists
- dc8a54b8000b: Already exists
- b2c1d103db99: Already exists
- edfa752aa38a: Already exists
- 583d37cbf2f0: Already exists
- c7846a240c1d: Already exists
- cc0bc6e8c5cf: Pull complete
- 43635160a7c0: Pull complete
- 56065ffbc975: Pull complete
- 3ceca89a6c41: Pull complete
- c20c1f22c2a2: Pull complete
- 1067d022a98a: Pull complete
- Digest: sha256:ae9709d27bfe16844bb424e0805009f285e740c84cc4f28f3dbfad2ae0206807
- Status: Downloaded newer image for php:7.3.2-apache
- ---> 3b38e3ca9b55
- Step 2/3 : COPY index.php /var/www/html/
- ---> 2197494be0ba
- Step 3/3 : EXPOSE 80
- ---> Running in c34371a1cc45
- Removing intermediate container c34371a1cc45
- ---> 681e52e46f38
- Successfully built 681e52e46f38
- Successfully tagged myphpapp:1.1-apache
- nila:~/mywebapp$ vi Dockerfile.1.2
- nila:~/mywebapp$ docker images
- REPOSITORY TAG IMAGE ID CREATED SIZE
- myphpapp 1.1-apache 681e52e46f38 33 seconds ago 379MB
- tecmp18/mywebapp 1.1-alpine cdee649cd49e 47 hours ago 124MB
- tecmp18/mywebapp alpine cdee649cd49e 47 hours ago 124MB
- mywebapp 1.1-alpine cdee649cd49e 47 hours ago 124MB
- mywebapp alpine cdee649cd49e 47 hours ago 124MB
- mywebapp 1.0-alpine c082b5427820 47 hours ago 124MB
- tecmp18/mywebapp 1.0-alpine c082b5427820 47 hours ago 124MB
- httpd 2.4.38-alpine ed4a3497e4bd 8 days ago 124MB
- httpd alpine ed4a3497e4bd 8 days ago 124MB
- wordpress latest 7539ce0f28d0 12 days ago 420MB
- php 7.3.2-apache 3b38e3ca9b55 12 days ago 379MB
- nginx latest f09fe80eb0e7 2 weeks ago 109MB
- mysql 5.5 50ba61f07d0c 2 weeks ago 205MB
- mysql latest 81f094a7e4cc 2 weeks ago 477MB
- debian latest d508d16c64cd 2 weeks ago 101MB
- nginx alpine b411e34b4606 2 weeks ago 16.1MB
- portainer/portainer latest 89c72b64ab63 3 weeks ago 74.2MB
- alpine latest caf27325b298 3 weeks ago 5.53MB
- phpmyadmin/phpmyadmin latest c6ba363e7c9b 3 weeks ago 166MB
- nila:~/mywebapp$ docker container start myphpapp:1.1-apache
- Error response from daemon: No such container: myphpapp:1.1-apache
- Error: failed to start containers: myphpapp:1.1-apache
- nila:~/mywebapp$ docker container ls
- CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
- nila:~/mywebapp$ docker container create
- "docker container create" requires at least 1 argument.
- See 'docker container create --help'.
- Usage: docker container create [OPTIONS] IMAGE [COMMAND] [ARG...]
- Create a new container
- nila:~/mywebapp$ docker container create myphpapp:1.1-apache
- de643571074bfc551994d59055628780ad19f76ed4f8a20caed240b9e9c6586a
- nila:~/mywebapp$ docker container start myphpapp:1.1-apache
- Error response from daemon: No such container: myphpapp:1.1-apache
- Error: failed to start containers: myphpapp:1.1-apache
- nila:~/mywebapp$ docker container ls
- CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
- nila:~/mywebapp$ docker container ls -a
- CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
- de643571074b myphpapp:1.1-apache "docker-php-entrypoi…" 18 seconds ago Created wizardly_hypatia
- 1c1f29fd221d phpmyadmin/phpmyadmin "/run.sh supervisord…" 2 days ago Exited (0) 45 hours ago dbc1
- 28338efc1bae mysql:5.5 "docker-entrypoint.s…" 2 days ago Exited (0) 45 hours ago db1
- a3088f871b1e debian "bash" 2 days ago Exited (255) 2 hours ago d1
- 0d1c7e619f39 alpine "/bin/sh" 2 days ago Exited (137) 2 days ago b1
- fea7a2e79f8b alpine "/bin/sh" 2 days ago Exited (137) 2 days ago v3
- ce1021453d8f alpine "/bin/sh" 2 days ago Exited (137) 2 days ago v2
- cc72dfb4a354 alpine "/bin/sh" 2 days ago Exited (137) 2 days ago v1
- 17b9749c0b06 nginx:alpine "nginx -g 'daemon of…" 2 days ago Exited (0) 2 days ago pws2
- 075b53d202dc nginx:alpine "nginx -g 'daemon of…" 2 days ago Exited (255) 2 days ago 80/tcp pws1
- b4fa01fa1944 alpine "/bin/sh" 2 days ago Exited (255) 2 days ago pc2
- e36fe53cc757 alpine "/bin/sh" 2 days ago Exited (255) 2 days ago pc1
- a6c7c68a9e2f alpine "/bin/sh" 2 days ago Exited (137) 2 days ago C5
- 5b038f5822af nginx:alpine "nginx -g 'daemon of…" 2 days ago Exited (0) 2 days ago S1
- 007d74a13662 alpine "sleep 5m" 2 days ago Exited (0) 2 days ago C3
- fc3adcb952b2 alpine "/bin/sh" 2 days ago Exited (137) 2 days ago C1
- e09e9835e79f nginx:alpine "nginx -g 'daemon of…" 2 days ago Exited (255) 2 days ago 80/tcp wonderful_borg
- nila:~/mywebapp$ docker container start docker image build -f Dockerfile.1.1 -t mywebapp:1.1-alpine /home/user1/mywebapp/
- unknown shorthand flag: 'f' in -f
- See 'docker container start --help'.
- nila:~/mywebapp$ docker container start wizardly_hypatia
- wizardly_hypatia
- nila:~/mywebapp$ docker container ls -a
- CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
- de643571074b myphpapp:1.1-apache "docker-php-entrypoi…" About a minute ago Up 4 seconds 80/tcp wizardly_hypatia
- 1c1f29fd221d phpmyadmin/phpmyadmin "/run.sh supervisord…" 2 days ago Exited (0) 45 hours ago dbc1
- 28338efc1bae mysql:5.5 "docker-entrypoint.s…" 2 days ago Exited (0) 45 hours ago db1
- a3088f871b1e debian "bash" 2 days ago Exited (255) 2 hours ago d1
- 0d1c7e619f39 alpine "/bin/sh" 2 days ago Exited (137) 2 days ago b1
- fea7a2e79f8b alpine "/bin/sh" 2 days ago Exited (137) 2 days ago v3
- ce1021453d8f alpine "/bin/sh" 2 days ago Exited (137) 2 days ago v2
- cc72dfb4a354 alpine "/bin/sh" 2 days ago Exited (137) 2 days ago v1
- 17b9749c0b06 nginx:alpine "nginx -g 'daemon of…" 2 days ago Exited (0) 2 days ago pws2
- 075b53d202dc nginx:alpine "nginx -g 'daemon of…" 2 days ago Exited (255) 2 days ago 80/tcp pws1
- b4fa01fa1944 alpine "/bin/sh" 2 days ago Exited (255) 2 days ago pc2
- e36fe53cc757 alpine "/bin/sh" 2 days ago Exited (255) 2 days ago pc1
- a6c7c68a9e2f alpine "/bin/sh" 2 days ago Exited (137) 2 days ago C5
- 5b038f5822af nginx:alpine "nginx -g 'daemon of…" 2 days ago Exited (0) 2 days ago S1
- 007d74a13662 alpine "sleep 5m" 2 days ago Exited (0) 2 days ago C3
- fc3adcb952b2 alpine "/bin/sh" 2 days ago Exited (137) 2 days ago C1
- e09e9835e79f nginx:alpine "nginx -g 'daemon of…" 2 days ago Exited (255) 2 days ago 80/tcp wonderful_borg
- nila:~/mywebapp$ docker container ls
- CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
- de643571074b myphpapp:1.1-apache "docker-php-entrypoi…" About a minute ago Up 7 seconds 80/tcp wizardly_hypatia
- nila:~/mywebapp$ docker container stop wizardly_hypatia
- wizardly_hypatia
- nila:~/mywebapp$ docker container rm myphpapp:1.1-apache
- Error: No such container: myphpapp:1.1-apache
- nila:~/mywebapp$ docker container rm wizardly_hypatia
- wizardly_hypatia
- nila:~/mywebapp$ docker container create -h php --name php -p 8080:80 myphpapp:1.1-apache
- 16a477d97e6ae04ba3a272871baa9e293e9377e73424ad82140d16ed178b9312
- nila:~/mywebapp$ docker container start php
- php
- nila:~/mywebapp$ docker container ls
- CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
- 16a477d97e6a myphpapp:1.1-apache "docker-php-entrypoi…" 17 seconds ago Up 5 seconds 0.0.0.0:8080->80/tcp php
- nila:~/mywebapp$ cd ..
- nila:~$ mkdir nodejs
- nila:~$ cp mywebapp/Dockerfile.1.2 nodejs/
- nila:~$ cd nodejs/
- nila:~/nodejs$ ls
- Dockerfile.1.2
- nila:~/nodejs$ mv Dockerfile.1.2 Dockerfile.1.3
- nila:~/nodejs$ vi Dockerfile.1.3
- nila:~/nodejs$ vi Dockerfile.1.3
- nila:~/nodejs$ export http_proxy=http://web-proxy.in.hpecorp.net:8080
- nila:~/nodejs$ wget http://bit.ly/d2-nodesample
- Connecting to web-proxy.in.hpecorp.net:8080 (16.167.28.210:8080)
- wget: server returned error: HTTP/1.1 400 Bad Request
- nila:~/nodejs$ export http_proxy=http://web-proxy.corp.hpecorp.net:8080
- nila:~/nodejs$ ls
- Dockerfile.1.3
- nila:~/nodejs$ wget http://bit.ly/d2-nodesample
- Connecting to web-proxy.corp.hpecorp.net:8080 (16.85.88.10:8080)
- wget: server returned error: HTTP/1.1 400 Bad Request
- nila:~/nodejs$ export http_proxy=http://web-proxy.in.hpecorp.net:8080
- nila:~/nodejs$ wget http://bit.ly/d2-nodesample
- Connecting to web-proxy.in.hpecorp.net:8080 (16.167.28.210:8080)
- wget: server returned error: HTTP/1.1 400 Bad Request
- nila:~/nodejs$ df -kh
- Filesystem Size Used Available Use% Mounted on
- devtmpfs 10.0M 0 10.0M 0% /dev
- shm 1.9G 2.3M 1.9G 0% /dev/shm
- /dev/sda3 15.6G 2.8G 12.0G 19% /
- tmpfs 394.8M 376.0K 394.4M 0% /run
- /dev/sda1 92.8M 13.3M 72.6M 15% /boot
- /dev/sda3 15.6G 2.8G 12.0G 19% /var/lib/docker
- none 1.9G 0 1.9G 0% /run/user/1000
- df: /var/lib/docker/overlay2/74bf2769c1abf6d004d302c60cd3989dcade0373b42cb475cad66c5e91ed30bd/merged: Permission denied
- df: /var/lib/docker/containers/16a477d97e6ae04ba3a272871baa9e293e9377e73424ad82140d16ed178b9312/mounts/shm: Permission denied
- df: /run/docker/netns/d51d30def080: Permission denied
- nila:~/nodejs$ df -kh
- Filesystem Size Used Available Use% Mounted on
- devtmpfs 10.0M 0 10.0M 0% /dev
- shm 1.9G 2.3M 1.9G 0% /dev/shm
- /dev/sda3 15.6G 2.8G 12.0G 19% /
- tmpfs 394.8M 376.0K 394.4M 0% /run
- /dev/sda1 92.8M 13.3M 72.6M 15% /boot
- /dev/sda3 15.6G 2.8G 12.0G 19% /var/lib/docker
- none 1.9G 0 1.9G 0% /run/user/1000
- df: /var/lib/docker/overlay2/74bf2769c1abf6d004d302c60cd3989dcade0373b42cb475cad66c5e91ed30bd/merged: Permission denied
- df: /var/lib/docker/containers/16a477d97e6ae04ba3a272871baa9e293e9377e73424ad82140d16ed178b9312/mounts/shm: Permission denied
- df: /run/docker/netns/d51d30def080: Permission denied
- nila:~/nodejs$ sudo su
- [sudo] password for user1:
- nila:/home/user1/nodejs# whoami
- root
- nila:/home/user1/nodejs# cd /etc/profile.d/
- nila:/etc/profile.d# ls
- bash_completion.sh color_prompt vte.sh
- nila:/etc/profile.d# vi proxy.sh
- nila:/etc/profile.d# vi proxy.sh
- nila:/etc/profile.d# exit
- nila:~/nodejs$
- nila:~$ env
- XDG_MENU_PREFIX=xfce-
- DISPLAY=:0.0
- COLORTERM=truecolor
- EINFO_LOG=/etc/init.d/lxdm
- SSH_AUTH_SOCK=/tmp/ssh-6XxO0VAMRoOg/agent.4719
- GLADE_CATALOG_PATH=:
- USER=user1
- GLADE_MODULE_PATH=:
- PAGER=less
- DESKTOP_SESSION=xfce
- RC_SERVICE=/etc/init.d/lxdm
- PWD=/home/user1
- HOME=/home/user1
- SSH_AGENT_PID=4720
- https_proxy=http://web-proxy.in.hpecorp.net:8080
- XDG_DATA_DIRS=/usr/local/share:/usr/share
- CHARSET=UTF-8
- http_proxy=http://web-proxy.in.hpecorp.net:8080
- no_proxy=localhost
- GLADE_PIXMAP_PATH=:
- TERM=xterm-256color
- SHELL=/bin/bash
- VTE_VERSION=5202
- XDG_CURRENT_DESKTOP=XFCE
- SHLVL=6
- WINDOWID=27262979
- LOGNAME=user1
- DBUS_SESSION_BUS_ADDRESS=unix:abstract=/tmp/dbus-5jFYHRfFDv,guid=ad97088ea715fffe3f8642495c6e3a14
- XAUTHORITY=/home/user1/.Xauthority
- RC_SVCNAME=lxdm
- XDG_CONFIG_DIRS=/etc/xdg
- PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
- PS1=\h:\w\$
- XDG_SESSION_COOKIE=nila-1550727700.388787-119490857
- SESSION_MANAGER=local/nila:@/tmp/.ICE-unix/4695,unix/nila:/tmp/.ICE-unix/4695
- SVCNAME=lxdm
- _=/usr/bin/env
- nila:~$ chromium-browser --proxy-server $https_proxy
- Opening in existing browser session.
- nila:~$ pwd
- /home/user1
- nila:~$ cd Downloads/
- nila:~/Downloads$ ls
- package.json server.js
- nila:~/Downloads$ cp package.json server.js /home/user1/
- .ICEauthority .cache/ .local/ Downloads/ mywebapp/
- .Xauthority .config/ .pki/ app1/ name.txt
- .ash_history .dbus/ .xsession-errors index.html nodejs/
- .bash_history .docker/ Desktop/ index.php
- nila:~/Downloads$ cp package.json server.js /home/user1/nodejs/
- nila:~/Downloads$ ls
- package.json server.js
- nila:~/Downloads$ cd ..
- nila:~$ cd nodejs/
- nila:~/nodejs$ ls
- Dockerfile.1.3 package.json server.js
- nila:~/nodejs$ vi Dockerfile.1.3
- nila:~/nodejs$ vi Dockerfile.1.3
- nila:~/nodejs$ docker container start docker image build -f Dockerfile.1.3 -t nodejs:1.0-alpine /home/user1/mywebapp/nodejs
- unknown shorthand flag: 'f' in -f
- See 'docker container start --help'.
- nila:~/nodejs$ docker image build -f Dockerfile.1.3 -t nodejs:1.0-alpine /home/user1/mywebapp/nodejs
- unable to prepare context: path "/home/user1/mywebapp/nodejs" not found
- nila:~/nodejs$ pwd
- /home/user1/nodejs
- nila:~/nodejs$ docker image build -f Dockerfile.1.3 -t nodejs:1.0-alpine /home/user1/nodejs
- Sending build context to Docker daemon 4.096kB
- Step 1/9 : FROM node:8.15.0-alpine
- 8.15.0-alpine: Pulling from library/node
- 169185f82c45: Pull complete
- 62154f231947: Pull complete
- acf10a8404b6: Pull complete
- Digest: sha256:812e5a88e7dc8e8d9011f18a864d2fd7da4d85b6d77c545b71a73b13c1f4993e
- Status: Downloaded newer image for node:8.15.0-alpine
- ---> e8ae960eaa9e
- Step 2/9 : LABEL maintainer "Nodejs App"
- ---> Running in 6e55f766e97c
- Removing intermediate container 6e55f766e97c
- ---> dc87b99eb6f4
- Step 3/9 : WORKDIR /app
- ---> Running in f38507c1f221
- Removing intermediate container f38507c1f221
- ---> 2d5182fa0477
- Step 4/9 : COPY server.js .
- ---> 8f9312523930
- Step 5/9 : COPY package.json .
- ---> 9638e6b10f80
- Step 6/9 : RUN npm install
- ---> Running in 2bbfd9c0e69a
- ^Z
- [1]+ Stopped docker image build -f Dockerfile.1.3 -t nodejs:1.0-alpine /home/user1/nodejs
- nila:~/nodejs$ vi Dockerfile.1.3
- nila:~/nodejs$ docker image build -f Dockerfile.1.3 -t nodejs:1.0-alpine /home/user1/nodejs
- Sending build context to Docker daemon 4.096kB
- Step 1/11 : FROM node:8.15.0-alpine
- ---> e8ae960eaa9e
- Step 2/11 : LABEL maintainer "Nodejs App"
- ---> Using cache
- ---> dc87b99eb6f4
- Step 3/11 : WORKDIR /app
- ---> Using cache
- ---> 2d5182fa0477
- Step 4/11 : COPY server.js .
- ---> Using cache
- ---> 8f9312523930
- Step 5/11 : COPY package.json .
- ---> Using cache
- ---> 9638e6b10f80
- Step 6/11 : ENV http_proxy=http://web-proxy.in.hpecorp.net:8080
- ---> Running in 10817d552dd9
- Removing intermediate container 10817d552dd9
- ---> cfa7ef73b83e
- Step 7/11 : ENV https_proxy=http://web-proxy.in.hpecorp.net:8080
- ---> Running in 2611ef612184
- Removing intermediate container 2611ef612184
- ---> 937b2afa0d9c
- Step 8/11 : RUN npm install
- ---> Running in 3b815ecc5bc8
- npm notice created a lockfile as package-lock.json. You should commit this file.
- npm WARN sampleapp@1.0.0 No repository field.
- added 48 packages from 36 contributors and audited 121 packages in 19.433s
- found 0 vulnerabilities
- Removing intermediate container 3b815ecc5bc8
- ---> 5991a260a124
- Step 9/11 : EXPOSE 8080
- ---> Running in 9beefb6fca2f
- Removing intermediate container 9beefb6fca2f
- ---> ea4cb07d38ec
- Step 10/11 : CMD ["server.js"]
- ---> Running in 7e5a8bed3201
- Removing intermediate container 7e5a8bed3201
- ---> 4fff367fa8b6
- Step 11/11 : ENTRYPOINT ["node"]
- ---> Running in d427357cf42d
- Removing intermediate container d427357cf42d
- ---> 3ab604b75e8b
- Successfully built 3ab604b75e8b
- Successfully tagged nodejs:1.0-alpine
- nila:~/nodejs$ docker container create -h nodejs --name nodejs -p 8090:8080 nodejs:1.0-alpine
- fe38a5a9c197e629975811ae507123587dbfd5dcf2c3a1129d1942189ef52ce8
- nila:~/nodejs$ docker container start nodejs
- nodejs
- nila:~/nodejs$
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement