Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- dc raidz_test
- deallocvt ranlib
- diff readelf
- dirname readlink
- distro realpath
- docker recode-sr-latin
- docker-compose rename
- doesitcache renice
- dos2unix reset
- dotenv resize
- du rev
- dumpleases rview
- dwp rvim
- easy_install-3.8 scanelf
- eject scp
- elfedit script
- env scriptlive
- envsubst scriptreplay
- ex seq
- expand setarch
- expr setkeycodes
- factor setpriv
- fallocate setsid
- file setterm
- fincore sftp
- find sha1sum
- findssl.sh sha256sum
- flock sha3sum
- fold sha512sum
- free showkey
- fuser shred
- g++ shuf
- gcc size
- gcc-ar smemcap
- gcc-nm sort
- gcc-ranlib split
- gcov ssh
- gcov-dump ssh-add
- gcov-tool ssh-agent
- gdbm_dump ssh-copy-id
- gdbm_load ssh-keygen
- gdbmtool ssh-keyscan
- getconf ssh-pkcs11-helper
- getent ssl_client
- getopt strings
- gettext strip
- gettext.sh sum
- gettextize tac
- git tail
- git-receive-pack taskset
- git-shell tee
- git-upload-archive test
- git-upload-pack time
- gprof timeout
- groups tmux
- hardlink top
- hd tr
- head traceroute
- hexdump traceroute6
- hostid tree
- htdbm truncate
- htdigest tty
- htpasswd ttysize
- httxt2dbm udhcpc6
- i386 ul
- iconv uname26
- id unexpand
- install uniq
- ionice unix2dos
- ipcmk unlink
- ipcrm unlzma
- ipcs unlzop
- iptables-xml unpigz
- isosize unshare
- jq unxz
- jsonschema unzip
- killall uptime
- ld utmpdump
- ld.bfd uudecode
- ldd uuencode
- less uuidgen
- linux32 uuidparse
- linux64 vi
- logger view
- logresolve vim
- look vimtutor
- lsattr vlock
- lscpu volname
- lsipc wall
- lslocks wc
- lslogins wget
- lsmem whereis
- lsns which
- lsof whoami
- lsusb whois
- lzcat wsdump.py
- lzcmp x86_64
- lzdiff x86_64-alpine-linux-musl-c++
- lzegrep x86_64-alpine-linux-musl-g++
- lzfgrep x86_64-alpine-linux-musl-gcc
- lzgrep x86_64-alpine-linux-musl-gcc-9.3.0
- lzless x86_64-alpine-linux-musl-gcc-ar
- lzma x86_64-alpine-linux-musl-gcc-nm
- lzmadec x86_64-alpine-linux-musl-gcc-ranlib
- lzmainfo x86_64-alpine-linux-musl-gdc
- lzmore xargs
- lzopcat xgettext
- make xmlwf
- mcookie xxd
- md5sum xz
- mesg xzcat
- microcom xzcmp
- mkfifo xzdec
- mkpasswd xzdiff
- msgattrib xzegrep
- msgcat xzfgrep
- msgcmp xzgrep
- msgcomm xzless
- msgconv xzmore
- msgen yes
- msgexec zgenhostid
- msgfilter zvol_wait
- [node1] (local) root@192.168.0.8 ~
- unknown shorthand flag: 'i' in -it_12 psql -h localhost -U dockeruser -W -d pets
- See 'docker --help'.
- Usage: docker [OPTIONS] COMMAND
- A self-sufficient runtime for containers
- Options:
- --config string Location of client config files (default
- "/root/.docker")
- -c, --context string Name of the context to use to connect to the
- daemon (overrides DOCKER_HOST env var and
- default context set with "docker context use")
- -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
- "/root/.docker/ca.pem")
- --tlscert string Path to TLS certificate file (default
- "/root/.docker/cert.pem")
- --tlskey string Path to TLS key file (default
- "/root/.docker/key.pem")
- --tlsverify Use TLS and verify the remote
- -v, --version Print version information and quit
- Management Commands:
- app* Docker App (Docker Inc., v0.9.1-beta3)
- builder Manage builds
- checkpoint Manage checkpoints
- config Manage Docker configs
- container Manage containers
- context Manage contexts
- 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
- 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.
- To get more help with docker, check out guides at https://docs.docker.com/go/guides/
- [node1] (local) root@192.168.0.8 ~ s
- unknown shorthand flag: 'i' in -it_12 psql -h localhost -U dockeruser -W -d pets
- See 'docker --help'.
- Usage: docker [OPTIONS] COMMAND
- A self-sufficient runtime for containers
- Options:
- --config string Location of client config files (default
- "/root/.docker")
- -c, --context string Name of the context to use to connect to the
- daemon (overrides DOCKER_HOST env var and
- default context set with "docker context use")
- -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
- "/root/.docker/ca.pem")
- --tlscert string Path to TLS certificate file (default
- "/root/.docker/cert.pem")
- --tlskey string Path to TLS key file (default
- "/root/.docker/key.pem")
- --tlsverify Use TLS and verify the remote
- -v, --version Print version information and quit
- Management Commands:
- app* Docker App (Docker Inc., v0.9.1-beta3)
- builder Manage builds
- checkpoint Manage checkpoints
- config Manage Docker configs
- container Manage containers
- context Manage contexts
- 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
- 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.
- To get more help with docker, check out guides at https://docs.docker.com/go/guides/
- unknown shorthand flag: 'i' in -it_12 psql -h localhost -U dockeruser -W -d pets
- See 'docker --help'.
- Usage: docker [OPTIONS] COMMAND
- A self-sufficient runtime for containers
- Options:
- --config string Location of client config files (default
- "/root/.docker")
- -c, --context string Name of the context to use to connect to the
- daemon (overrides DOCKER_HOST env var and
- default context set with "docker context use")
- -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
- "/root/.docker/ca.pem")
- --tlscert string Path to TLS certificate file (default
- "/root/.docker/cert.pem")
- --tlskey string Path to TLS key file (default
- "/root/.docker/key.pem")
- --tlsverify Use TLS and verify the remote
- -v, --version Print version information and quit
- Management Commands:
- app* Docker App (Docker Inc., v0.9.1-beta3)
- builder Manage builds
- checkpoint Manage checkpoints
- config Manage Docker configs
- container Manage containers
- context Manage contexts
- 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
- 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.
- To get more help with docker, check out guides at https://docs.docker.com/go/guides/
- [node1] (local) root@192.168.0.8 ~ s
- unknown shorthand flag: 'i' in -it_12 psql -h localhost -U dockeruser -W -d pets
- See 'docker --help'.
- Usage: docker [OPTIONS] COMMAND
- A self-sufficient runtime for containers
- Options:
- --config string Location of client config files (default
- "/root/.docker")
- -c, --context string Name of the context to use to connect to the
- daemon (overrides DOCKER_HOST env var and
- default context set with "docker context use")
- -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
- "/root/.docker/ca.pem")
- --tlscert string Path to TLS certificate file (default
- "/root/.docker/cert.pem")
- --tlskey string Path to TLS key file (default
- "/root/.docker/key.pem")
- --tlsverify Use TLS and verify the remote
- -v, --version Print version information and quit
- Management Commands:
- app* Docker App (Docker Inc., v0.9.1-beta3)
- builder Manage builds
- checkpoint Manage checkpoints
- config Manage Docker configs
- container Manage containers
- context Manage contexts
- 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
- 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.
- To get more help with docker, check out guides at https://docs.docker.com/go/guides/
- [node1] (local) root@192.168.0.8 ~
- $ ~echo FROM postgres:12-alpine > Dockerfile
- bash: ~echo: command not found
- [node1] (local) root@192.168.0.8 ~
- $ docker exec -it widi_postgresql_12 psql -h localhost -U dockeruser -W -d pets
- Error response from daemon: Container 69be194912423e3b6b503389a06140927205aac83b4dee0934cd6e680beb592f is not running
- [node1] (local) root@192.168.0.8 ~
- $ docker run -p 5432:5432 --name widi_postgresql_12 -d widi_postgresql_12
- docker: Error response from daemon: Conflict. The container name "/widi_postgresql_12" is already in use by container "69be194912423e3b6b503389a06140927205aac83b4dee0934cd6e680beb592f". You have to remove (or rename) that container to be able to reuse that name.
- See 'docker run --help'.
- [node1] (local) root@192.168.0.8 ~
- $ docker stop widi_postgresql_12
- widi_postgresql_12
- [node1] (local) root@192.168.0.8 ~
- $ docker container rm widi_postgresql_12
- widi_postgresql_12
- [node1] (local) root@192.168.0.8 ~
- $ docker run -p 5432:5432 --name widi_postgresql_12 -d widi_postgresql_12
- ccabf90f2a1931150730a64571fa364e166b48f1cb31e9230bdf4a2f01aa9254
- [node1] (local) root@192.168.0.8 ~
- $ docker exec -it widi_postgresql_12 psql -h localhost -U dockeruser -W -d pets
- Error response from daemon: Container ccabf90f2a1931150730a64571fa364e166b48f1cb31e9230bdf4a2f01aa9254 is not running
- [node1] (local) root@192.168.0.8 ~
- $ docker run -it -p 5432:5432 --name widi_postgresql_12 -d widi_postgresql_12
- docker: Error response from daemon: Conflict. The container name "/widi_postgresql_12" is already in use by container "ccabf90f2a1931150730a64571fa364e166b48f1cb31e9230bdf4a2f01aa9254". You have to remove (or rename) that container to be able to reuse that name.
- See 'docker run --help'.
- [node1] (local) root@192.168.0.8 ~
- $ docker stop widi_postgresql_12
- widi_postgresql_12
- [node1] (local) root@192.168.0.8 ~
- $ docker container rm widi_postgresql_12
- widi_postgresql_12
- [node1] (local) root@192.168.0.8 ~
- $ docker run -it -p 5432:5432 --name widi_postgresql_12 -d widi_postgresql_12
- e87c83b6f028d2c2582e571cbc1395ca4887a607a8ce904c03e2d3123ac4d8b2
- [node1] (local) root@192.168.0.8 ~
- $ cd database
- [node1] (local) root@192.168.0.8 ~/database
- $ docker exec -it widi_postgresql_12 psql -h localhost -U dockeruser -W -d pets
- Error response from daemon: Container e87c83b6f028d2c2582e571cbc1395ca4887a607a8ce904c03e2d3123ac4d8b2 is not running
- [node1] (local) root@192.168.0.8 ~/database
- $ psql -h localhost -U dockeruser -W -d pets
- bash: psql: command not found
- [node1] (local) root@192.168.0.8 ~/database
- $ psql -h localhost -U dockeruser -W -d pets
- bash: psql: command not found
- [node1] (local) root@192.168.0.8 ~/database
- $ cd ~
- [node1] (local) root@192.168.0.8 ~
- $ mkdir web
- [node1] (local) root@192.168.0.8 ~
- $ echo > Dockerfile
- [node1] (local) root@192.168.0.8 ~
- $ mv Dockerfile /web
- [node1] (local) root@192.168.0.8 ~
- $ ls web
- [node1] (local) root@192.168.0.8 ~
- $ cd web
- [node1] (local) root@192.168.0.8 ~/web
- $ echo > Dockerfile
- [node1] (local) root@192.168.0.8 ~/web
- $ sshd restart
- sshd re-exec requires execution with an absolute path
- [node1] (local) root@192.168.0.8 ~/web
- $ sshd ~/web
- sshd re-exec requires execution with an absolute path
- [node1] (local) root@192.168.0.8 ~/web
- $ ls
- 3-female-lions.png buffalo.png hippos.png male-lion.png zebra.png
- Dockerfile cheetah.png index.html package.json
- antelopes.png elephants.png jackal.png server.js
- birds.png giraffe.png main.css vulture.png
- [node1] (local) root@192.168.0.8 ~/web
- $ rm *.png
- [node1] (local) root@192.168.0.8 ~/web
- $ rm *.js
- [node1] (local) root@192.168.0.8 ~/web
- $ ls
- Dockerfile index.html main.css package.json
- [node1] (local) root@192.168.0.8 ~/web
- $ rm *.json
- [node1] (local) root@192.168.0.8 ~/web
- $ rm *.css
- [node1] (local) root@192.168.0.8 ~/web
- $ rm *.html
- [node1] (local) root@192.168.0.8 ~/web
- $ mkdir public
- [node1] (local) root@192.168.0.8 ~/web
- $ cd public
- [node1] (local) root@192.168.0.8 ~/web/public
- $ mkdir css
- [node1] (local) root@192.168.0.8 ~/web/public
- $ mkdir images
- [node1] (local) root@192.168.0.8 ~/web/public
- $ cd css
- [node1] (local) root@192.168.0.8 ~/web/public/css
- $ cd ~
- [node1] (local) root@192.168.0.8 ~
- $ cd web/public/images
- [node1] (local) root@192.168.0.8 ~/web/public/images
- $ cd .
- [node1] (local) root@192.168.0.8 ~/web/public/images
- $ cd ./
- [node1] (local) root@192.168.0.8 ~/web/public/images
- $ cd ../
- [node1] (local) root@192.168.0.8 ~/web/public
- $ cd ../
- [node1] (local) root@192.168.0.8 ~/web
- $ ls
- Dockerfile package.json public
- [node1] (local) root@192.168.0.8 ~/web
- $ mkdir src
- [node1] (local) root@192.168.0.8 ~/web
- $ cd src
- [node1] (local) root@192.168.0.8 ~/web/src
- $ cd ~
- [node1] (local) root@192.168.0.8 ~
- $ ls
- database web
- [node1] (local) root@192.168.0.8 ~
- $ mkdir images
- [node1] (local) root@192.168.0.8 ~
- $ cd images
- [node1] (local) root@192.168.0.8 ~/images
- $ cd ~
- [node1] (local) root@192.168.0.8 ~
- $ cd web
- [node1] (local) root@192.168.0.8 ~/web
- $ docker build --tag widi_web_12 .
- Sending build context to Docker daemon 9.231MB
- Step 1/9 : FROM node:12.10-alpine
- 12.10-alpine: Pulling from library/node
- e7c96db7181b: Pull complete
- 95b3c812425e: Pull complete
- 778b81d0468f: Pull complete
- 28549a15ba3e: Pull complete
- Digest: sha256:744b156ec2dca0ad8291f80f9093273d45eb85378b6290b2fbbada861cc3ed01
- Status: Downloaded newer image for node:12.10-alpine
- ---> ef7d474eab14
- Step 2/9 : RUN mkdir /app
- ---> Running in 9534350de3d0
- Removing intermediate container 9534350de3d0
- ---> 7d16e5d67abb
- Step 3/9 : WORKDIR /app
- ---> Running in ac7d4c5e272e
- Removing intermediate container ac7d4c5e272e
- ---> c74f2cb4510e
- Step 4/9 : COPY package.json /app/
- ---> b79550738023
- Step 5/9 : RUN npm install
- ---> Running in 32809af3ce7a
- npm notice created a lockfile as package-lock.json. You should commit this file.
- npm WARN pets@2.0.0 No repository field.
- added 75 packages from 55 contributors and audited 75 packages in 3.605s
- found 0 vulnerabilities
- Removing intermediate container 32809af3ce7a
- ---> 589fbd26271e
- Step 6/9 : COPY ./public /app/public
- ---> 0f2ac50e0b13
- Step 7/9 : COPY ./src /app/src
- ---> a4188f13622e
- Step 8/9 : EXPOSE 3000
- ---> Running in b5c51465819a
- Removing intermediate container b5c51465819a
- ---> e38113f51917
- Step 9/9 : CMD node src/server.js
- ---> Running in c1b2edbf5e72
- Removing intermediate container c1b2edbf5e72
- ---> cf9b51e191a8
- Successfully built cf9b51e191a8
- Successfully tagged widi_web_12:latest
- [node1] (local) root@192.168.0.8 ~/web
- $ run npm install
- bash: run: command not found
- [node1] (local) root@192.168.0.8 ~/web
- $ npm instal
- bash: npm: command not found
- [node1] (local) root@192.168.0.8 ~/web
- $ docker run --name widi_web_12 -d -p 3000:3000 widi_web_12
- 068a35bbd591380f4db4a1fd42599cf2a9314df3977098141c3a8f7af4a4953e
- [node1] (local) root@192.168.0.8 ~/web
- $ cd ~
- [node1] (local) root@192.168.0.8 ~
- $ docker-compose -f docker-compose-dev.yml up --build
- ERROR: .FileNotFoundError: [Errno 2] No such file or directory: './docker-compose-dev.yml'
- [node1] (local) root@192.168.0.8 ~
- $ docker-compose -f docker-compose.dev.yml up --build
- Creating volume "root_pets-data" with default driver
- Building db
- Step 1/5 : FROM postgres:12-alpine
- ---> 10608227870c
- Step 2/5 : COPY init-db.sql /docker-entrypoint-initdb.d/
- ---> ff79e6d3fefd
- Step 3/5 : ENV POSTGRES_USER dockeruser
- ---> Running in 425b24c9bd1e
- Removing intermediate container 425b24c9bd1e
- ---> 64f2f6841c5f
- Step 4/5 : ENV POSTGRES_PASSWORD dockerpass
- ---> Running in e1b16d88921f
- Removing intermediate container e1b16d88921f
- ---> 62b878654698
- Step 5/5 : ENV POSTGRES_DB pets
- ---> Running in a434b119bc7b
- Removing intermediate container a434b119bc7b
- ---> d2a9567b69bf
- Successfully built d2a9567b69bf
- Successfully tagged root_db:latest
- Building web
- Step 1/9 : FROM node:12.10-alpine
- ---> ef7d474eab14
- Step 2/9 : RUN mkdir /app
- ---> Using cache
- ---> 7d16e5d67abb
- Step 3/9 : WORKDIR /app
- ---> Using cache
- ---> c74f2cb4510e
- Step 4/9 : COPY package.json /app/
- ---> 6e26696db820
- Step 5/9 : RUN npm install
- ---> Running in d421c64a5cba
- npm notice created a lockfile as package-lock.json. You should commit this file.
- npm WARN pets@2.0.0 No repository field.
- added 75 packages from 55 contributors and audited 75 packages in 3.329s
- found 0 vulnerabilities
- Removing intermediate container d421c64a5cba
- ---> a8b08c39043a
- Step 6/9 : COPY ./public /app/public
- ---> 122e3017f581
- Step 7/9 : COPY ./src /app/src
- ---> f1b984754bdd
- Step 8/9 : EXPOSE 3000
- ---> Running in 7cab8711ea5d
- Removing intermediate container 7cab8711ea5d
- ---> 9b36172282fb
- Step 9/9 : CMD node src/server.js
- ---> Running in 8fee89348430
- Removing intermediate container 8fee89348430
- ---> f14bfa22d52a
- Successfully built f14bfa22d52a
- Successfully tagged root_web:latest
- Creating root_db_1 ... done
- Creating root_web_1 ...
- Creating root_web_1 ... error
- ERROR: for root_web_1 Cannot start service web: driver failed programming external connectivity on endpoint root_web_1 (8fe09738156a1c099f3d23c20630cbf2eff92676dcb4c4150cd83ea7eb54be9f): Bind for 0.0.0.0:3000 failed: port is already allocated
- ERROR: for web Cannot start service web: driver failed programming external connectivity on endpoint root_web_1 (8fe09738156a1c099f3d23c20630cbf2eff92676dcb4c4150cd83ea7eb54be9f): Bind for 0.0.0.0:3000 failed: port is already allocated
- ERROR: Encountered errors while bringing up the project.
- [node1] (local) root@192.168.0.8 ~
- $ docker-compose -f docker-compose.dev.yml up --build
- Building db
- Step 1/5 : FROM postgres:12-alpine
- ---> 10608227870c
- Step 2/5 : COPY init-db.sql /docker-entrypoint-initdb.d/
- ---> Using cache
- ---> ff79e6d3fefd
- Step 3/5 : ENV POSTGRES_USER dockeruser
- ---> Using cache
- ---> 64f2f6841c5f
- Step 4/5 : ENV POSTGRES_PASSWORD dockerpass
- ---> Using cache
- ---> 62b878654698
- Step 5/5 : ENV POSTGRES_DB pets
- ---> Using cache
- ---> d2a9567b69bf
- Successfully built d2a9567b69bf
- Successfully tagged root_db:latest
- Building web
- Step 1/9 : FROM node:12.10-alpine
- ---> ef7d474eab14
- Step 2/9 : RUN mkdir /app
- ---> Using cache
- ---> 7d16e5d67abb
- Step 3/9 : WORKDIR /app
- ---> Using cache
- ---> c74f2cb4510e
- Step 4/9 : COPY package.json /app/
- ---> Using cache
- ---> 6e26696db820
- Step 5/9 : RUN npm install
- ---> Using cache
- ---> a8b08c39043a
- Step 6/9 : COPY ./public /app/public
- ---> Using cache
- ---> 122e3017f581
- Step 7/9 : COPY ./src /app/src
- ---> Using cache
- ---> f1b984754bdd
- Step 8/9 : EXPOSE 3000
- ---> Using cache
- ---> 9b36172282fb
- Step 9/9 : CMD node src/server.js
- ---> Using cache
- ---> f14bfa22d52a
- Successfully built f14bfa22d52a
- Successfully tagged root_web:latest
- Starting root_db_1 ... done
- Starting root_web_1 ... done
- Attaching to root_db_1, root_web_1
- db_1 |
- db_1 | PostgreSQL Database directory appears to contain a database; Skipping initialization
- db_1 |
- db_1 | 2021-01-10 13:59:51.271 UTC [1] LOG: starting PostgreSQL 12.5 on x86_64-pc-linux-musl, compiled by gcc (Alpine 9.3.0) 9.3.0, 64-bit
- db_1 | 2021-01-10 13:59:51.273 UTC [1] LOG: listening on IPv4 address "0.0.0.0", port 5432
- db_1 | 2021-01-10 13:59:51.274 UTC [1] LOG: listening on IPv6 address "::", port 5432
- db_1 | 2021-01-10 13:59:51.279 UTC [1] LOG: listening on Unix socket "/var/run/postgresql/.s.PGSQL.5432"
- db_1 | 2021-01-10 13:59:51.306 UTC [21] LOG: database system was interrupted; last known up at 2021-01-10 13:57:18 UTC
- db_1 | 2021-01-10 13:59:51.349 UTC [21] LOG: database system was not properly shut down; automatic recovery in progress
- db_1 | 2021-01-10 13:59:51.394 UTC [21] LOG: redo starts at 0/164DEB0
- db_1 | 2021-01-10 13:59:51.394 UTC [21] LOG: invalid record length at 0/164DFA8: wanted 24, got 0
- db_1 | 2021-01-10 13:59:51.394 UTC [21] LOG: redo done at 0/164DF60
- db_1 | 2021-01-10 13:59:51.447 UTC [1] LOG: database system is ready to accept connections
- web_1 | Listening at 0.0.0.0:3000
- web_1 | Connecting to DB
- web_1 | Connected!
- web_1 | Random = 6
- web_1 | SQL = SELECT * FROM images WHERE imageid=6
- db_1 | 2021-01-10 14:00:00.408 UTC [28] ERROR: relation "images" does not exist at character 15
- db_1 | 2021-01-10 14:00:00.408 UTC [28] STATEMENT: SELECT * FROM images WHERE imageid=6
- web_1 | error: relation "images" does not exist
- web_1 | at Connection.parseE (/app/node_modules/pg/lib/connection.js:614:13)
- web_1 | at Connection.parseMessage (/app/node_modules/pg/lib/connection.js:413:19)
- web_1 | at Socket.<anonymous> (/app/node_modules/pg/lib/connection.js:129:22)
- web_1 | at Socket.emit (events.js:209:13)
- web_1 | at addChunk (_stream_readable.js:305:12)
- web_1 | at readableAddChunk (_stream_readable.js:286:11)
- web_1 | at Socket.Readable.push (_stream_readable.js:220:10)
- web_1 | at TCP.onStreamRead (internal/stream_base_commons.js:182:23) {
- web_1 | name: 'error',
- web_1 | length: 105,
- web_1 | severity: 'ERROR',
- web_1 | code: '42P01',
- web_1 | detail: undefined,
- web_1 | hint: undefined,
- web_1 | position: '15',
- web_1 | internalPosition: undefined,
- web_1 | internalQuery: undefined,
- web_1 | where: undefined,
- web_1 | schema: undefined,
- web_1 | table: undefined,
- web_1 | column: undefined,
- web_1 | dataType: undefined,
- web_1 | constraint: undefined,
- web_1 | file: 'parse_relation.c',
- web_1 | line: '1191',
- web_1 | routine: 'parserOpenTable'
- web_1 | } undefined
- web_1 | /app/src/server.js:40
- web_1 | const url = result.rows[0].url;
- web_1 | ^
- web_1 |
- web_1 | TypeError: Cannot read property 'rows' of undefined
- web_1 | at Query.callback (/app/src/server.js:40:28)
- web_1 | at Query.handleError (/app/node_modules/pg/lib/query.js:145:17)
- web_1 | at Connection.connectedErrorMessageHandler (/app/node_modules/pg/lib/client.js:214:17)
- web_1 | at Connection.emit (events.js:209:13)
- web_1 | at Socket.<anonymous> (/app/node_modules/pg/lib/connection.js:134:12)
- web_1 | at Socket.emit (events.js:209:13)
- web_1 | at addChunk (_stream_readable.js:305:12)
- web_1 | at readableAddChunk (_stream_readable.js:286:11)
- web_1 | at Socket.Readable.push (_stream_readable.js:220:10)
- web_1 | at TCP.onStreamRead (internal/stream_base_commons.js:182:23)
- root_web_1 exited with code 1
- cd /database^[[D^[[D^[[D^[[D^[[D
- ^CGracefully stopping... (press Ctrl+C again to force)
- Stopping root_db_1 ... done
- [node1] (local) root@192.168.0.8 ~
- $ cd database
- [node1] (local) root@192.168.0.8 ~/database
- $ cd ~
- [node1] (local) root@192.168.0.8 ~
- $ ls
- Nodes.md docker-compose.dev.yml web
- database images
- [node1] (local) root@192.168.0.8 ~
- $ docker-compose -f docker-compose.dev.yml up --build
- Building db
- Step 1/6 : FROM postgres:12-alpine
- ---> 10608227870c
- Step 2/6 : COPY init-db.sql /docker-entrypoint-initdb.d/
- ---> Using cache
- ---> ff79e6d3fefd
- Step 3/6 : ENV POSTGRES_USER dockeruser
- ---> Using cache
- ---> 64f2f6841c5f
- Step 4/6 : ENV POSTGRES_PASSWORD dockerpass
- ---> Using cache
- ---> 62b878654698
- Step 5/6 : ENV POSTGRES_DB pets
- ---> Using cache
- ---> d2a9567b69bf
- Step 6/6 : EXPOSE 5432
- ---> Running in 9d02a775a5d2
- Removing intermediate container 9d02a775a5d2
- ---> 3caaa08d8a1d
- Successfully built 3caaa08d8a1d
- Successfully tagged root_db:latest
- Building web
- Step 1/9 : FROM node:12.10-alpine
- ---> ef7d474eab14
- Step 2/9 : RUN mkdir /app
- ---> Using cache
- ---> 7d16e5d67abb
- Step 3/9 : WORKDIR /app
- ---> Using cache
- ---> c74f2cb4510e
- Step 4/9 : COPY package.json /app/
- ---> Using cache
- ---> 6e26696db820
- Step 5/9 : RUN npm install
- ---> Using cache
- ---> a8b08c39043a
- Step 6/9 : COPY ./public /app/public
- ---> Using cache
- ---> 122e3017f581
- Step 7/9 : COPY ./src /app/src
- ---> Using cache
- ---> f1b984754bdd
- Step 8/9 : EXPOSE 3000
- ---> Using cache
- ---> 9b36172282fb
- Step 9/9 : CMD node src/server.js
- ---> Using cache
- ---> f14bfa22d52a
- Successfully built f14bfa22d52a
- Successfully tagged root_web:latest
- Recreating root_db_1 ... done
- Recreating root_web_1 ... done
- Attaching to root_db_1, root_web_1
- db_1 |
- db_1 | PostgreSQL Database directory appears to contain a database; Skipping initialization
- db_1 |
- db_1 | 2021-01-10 14:01:44.657 UTC [1] LOG: starting PostgreSQL 12.5 on x86_64-pc-linux-musl, compiled by gcc (Alpine 9.3.0) 9.3.0, 64-bit
- db_1 | 2021-01-10 14:01:44.661 UTC [1] LOG: listening on IPv4 address "0.0.0.0", port 5432
- db_1 | 2021-01-10 14:01:44.662 UTC [1] LOG: listening on IPv6 address "::", port 5432
- db_1 | 2021-01-10 14:01:44.664 UTC [1] LOG: listening on Unix socket "/var/run/postgresql/.s.PGSQL.5432"
- db_1 | 2021-01-10 14:01:44.719 UTC [22] LOG: database system was shut down at 2021-01-10 14:01:08 UTC
- db_1 | 2021-01-10 14:01:44.728 UTC [1] LOG: database system is ready to accept connections
- web_1 | Listening at 0.0.0.0:3000
- web_1 | Connecting to DB
- web_1 | Connected!
- web_1 | Random = 6
- web_1 | SQL = SELECT * FROM images WHERE imageid=6
- db_1 | 2021-01-10 14:02:06.704 UTC [29] ERROR: relation "images" does not exist at character 15
- db_1 | 2021-01-10 14:02:06.704 UTC [29] STATEMENT: SELECT * FROM images WHERE imageid=6
- web_1 | error: relation "images" does not exist
- web_1 | at Connection.parseE (/app/node_modules/pg/lib/connection.js:614:13)
- web_1 | at Connection.parseMessage (/app/node_modules/pg/lib/connection.js:413:19)
- web_1 | at Socket.<anonymous> (/app/node_modules/pg/lib/connection.js:129:22)
- web_1 | at Socket.emit (events.js:209:13)
- web_1 | at addChunk (_stream_readable.js:305:12)
- web_1 | at readableAddChunk (_stream_readable.js:286:11)
- web_1 | at Socket.Readable.push (_stream_readable.js:220:10)
- web_1 | at TCP.onStreamRead (internal/stream_base_commons.js:182:23) {
- web_1 | name: 'error',
- web_1 | length: 105,
- web_1 | severity: 'ERROR',
- web_1 | code: '42P01',
- web_1 | detail: undefined,
- web_1 | hint: undefined,
- web_1 | position: '15',
- web_1 | internalPosition: undefined,
- web_1 | internalQuery: undefined,
- web_1 | where: undefined,
- web_1 | schema: undefined,
- web_1 | table: undefined,
- web_1 | column: undefined,
- web_1 | dataType: undefined,
- web_1 | constraint: undefined,
- web_1 | file: 'parse_relation.c',
- web_1 | line: '1191',
- web_1 | routine: 'parserOpenTable'
- web_1 | } undefined
- web_1 | /app/src/server.js:40
- web_1 | const url = result.rows[0].url;
- web_1 | ^
- web_1 |
- web_1 | TypeError: Cannot read property 'rows' of undefined
- web_1 | at Query.callback (/app/src/server.js:40:28)
- web_1 | at Query.handleError (/app/node_modules/pg/lib/query.js:145:17)
- web_1 | at Connection.connectedErrorMessageHandler (/app/node_modules/pg/lib/client.js:214:17)
- web_1 | at Connection.emit (events.js:209:13)
- web_1 | at Socket.<anonymous> (/app/node_modules/pg/lib/connection.js:134:12)
- web_1 | at Socket.emit (events.js:209:13)
- web_1 | at addChunk (_stream_readable.js:305:12)
- web_1 | at readableAddChunk (_stream_readable.js:286:11)
- web_1 | at Socket.Readable.push (_stream_readable.js:220:10)
- web_1 | at TCP.onStreamRead (internal/stream_base_commons.js:182:23)
- root_web_1 exited with code 1
- ^CGracefully stopping... (press Ctrl+C again to force)
- Stopping root_db_1 ... done
- [node1] (local) root@192.168.0.8 ~
- $ psql -h localhost -U dockeruser -W -d pets
- bash: psql: command not found
- [node1] (local) root@192.168.0.8 ~
- $ docker exec -it psql -h localhost -U dockeruser -W -d pets
- Error: No such container: psql
- [node1] (local) root@192.168.0.8 ~
- $ docker exec -it psql -h localhost -U dockeruser -W -d pets
- Error: No such container: psql
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement