· 6 years ago · Apr 04, 2020, 07:58 PM
1inti@inti-VirtualBox:~$ xset r rate 190 60
2inti@inti-VirtualBox:~$ docker run hello-world
3
4Hello from Docker!
5This message shows that your installation appears to be working correctly.
6
7To generate this message, Docker took the following steps:
8 1. The Docker client contacted the Docker daemon.
9 2. The Docker daemon pulled the "hello-world" image from the Docker Hub.
10 (amd64)
11 3. The Docker daemon created a new container from that image which runs the
12 executable that produces the output you are currently reading.
13 4. The Docker daemon streamed that output to the Docker client, which sent it
14 to your terminal.
15
16To try something more ambitious, you can run an Ubuntu container with:
17 $ docker run -it ubuntu bash
18
19Share images, automate workflows, and more with a free Docker ID:
20 https://hub.docker.com/
21
22For more examples and ideas, visit:
23 https://docs.docker.com/get-started/
24
25inti@inti-VirtualBox:~$ git clone -b develop git@github.com:ByINTI/credencial-api.git
26Cloning into 'credencial-api'...
27The authenticity of host 'github.com (18.231.5.6)' can't be established.
28RSA key fingerprint is SHA256:nThbg6kXUpJWGl7E1IGOCspRomTxdCARLviKw6E5SY8.
29Are you sure you want to continue connecting (yes/no/[fingerprint])? yes
30Warning: Permanently added 'github.com,18.231.5.6' (RSA) to the list of known hosts.
31git@github.com: Permission denied (publickey).
32fatal: Could not read from remote repository.
33
34Please make sure you have the correct access rights
35and the repository exists.
36inti@inti-VirtualBox:~$ git clone -b develop https://github.com/ByINTI/credencial-api.git
37Cloning into 'credencial-api'...
38Username for 'https://github.com': thiagosilva@mail.com
39Password for 'https://thiagosilva@mail.com@github.com':
40remote: Invalid username or password.
41fatal: Authentication failed for 'https://github.com/ByINTI/credencial-api.git/'
42inti@inti-VirtualBox:~$ git clone -b develop https://github.com/ByINTI/credencial-api.git
43Cloning into 'credencial-api'...
44Username for 'https://github.com': thiagomeireless
45Password for 'https://thiagomeireless@github.com':
46remote: Invalid username or password.
47fatal: Authentication failed for 'https://github.com/ByINTI/credencial-api.git/'
48inti@inti-VirtualBox:~$ ls -al ~/.ssh
49total 12
50drwx------ 2 inti inti 4096 abr 4 16:43 .
51drwxr-xr-x 16 inti inti 4096 abr 4 16:44 ..
52-rw-r--r-- 1 inti inti 884 abr 4 16:43 known_hosts
53inti@inti-VirtualBox:~$ ssh-keygen -t rsa -b 4096 -C "thiagosilva@mail.com"
54Generating public/private rsa key pair.
55Enter file in which to save the key (/home/inti/.ssh/id_rsa):
56Enter passphrase (empty for no passphrase):
57Enter same passphrase again:
58Your identification has been saved in /home/inti/.ssh/id_rsa.
59Your public key has been saved in /home/inti/.ssh/id_rsa.pub.
60The key fingerprint is:
61SHA256:b9zswiw1IKpQEXTyEBn6+hAYEZxD+mpYyxFh05pefmg thiagosilva@mail.com
62The key's randomart image is:
63+---[RSA 4096]----+
64|=+%*. |
65|.BoB. |
66|+ o+. |
67|.++.. . . |
68|oo=o o .S. |
69|o*.oE . ooo |
70|=ooo . ++.o |
71|.o. ..+. |
72| . . .. |
73+----[SHA256]-----+
74inti@inti-VirtualBox:~$ eval "$(ssh-agent -s)"
75Agent pid 3351
76inti@inti-VirtualBox:~$ ssh-add ~/.ssh/id_rsa
77Identity added: /home/inti/.ssh/id_rsa (thiagosilva@mail.com)
78inti@inti-VirtualBox:~$ sudo apt-get install xclip
79[sudo] password for inti:
80Reading package lists... Done
81Building dependency tree
82Reading state information... Done
83The following packages were automatically installed and are no longer required:
84 gir1.2-geocodeglib-1.0 gir1.2-gst-plugins-base-1.0 gir1.2-gudev-1.0 gir1.2-udisks-2.0 grilo-plugins-0.3-base
85 gstreamer1.0-gtk3 guile-2.2-libs libboost-date-time1.67.0 libboost-filesystem1.67.0 libboost-iostreams1.67.0
86 libboost-locale1.67.0 libcdr-0.1-1 libclucene-contribs1v5 libclucene-core1v5 libcmis-0.5-5v5 libcolamd2
87 libdazzle-1.0-0 libe-book-0.1-1 libeot0 libepubgen-0.1-1 libetonyek-0.1-1 libevent-2.1-6 libfreerdp-client2-2
88 libfreerdp2-2 libgc1c2 libgom-1.0-0 libgpgmepp6 libgpod-common libgpod4 libgrilo-0.3-0 liblangtag-common
89 liblangtag1 liblirc-client0 liblua5.3-0 libminiupnpc17 libmspub-0.1-1 libodfgen-0.1-1 liborcus-0.14-0
90 libqqwing2v5 libraw19 librevenge-0.0-0 librsync2 libsgutils2-2 libsuitesparseconfig5 libvncclient1 libwinpr2-2
91 libxmlsec1 libxmlsec1-nss lp-solve media-player-info python3-bcrypt python3-fasteners python3-future
92 python3-lib2to3 python3-lockfile python3-mako python3-markupsafe python3-monotonic python3-paramiko syslinux
93 syslinux-common syslinux-legacy usb-creator-common
94Use 'sudo apt autoremove' to remove them.
95The following NEW packages will be installed:
96 xclip
970 upgraded, 1 newly installed, 0 to remove and 219 not upgraded.
98Need to get 18,4 kB of archives.
99After this operation, 60,4 kB of additional disk space will be used.
100Get:1 http://br.archive.ubuntu.com/ubuntu eoan/universe amd64 xclip amd64 0.13-1 [18,4 kB]
101Fetched 18,4 kB in 0s (386 kB/s)
102Selecting previously unselected package xclip.
103(Reading database ... 126068 files and directories currently installed.)
104Preparing to unpack .../xclip_0.13-1_amd64.deb ...
105Unpacking xclip (0.13-1) ...
106Setting up xclip (0.13-1) ...
107Processing triggers for man-db (2.8.7-3) ...
108inti@inti-VirtualBox:~$ xclip -sel clip < ~/.ssh/id_rsa.pub
109inti@inti-VirtualBox:~$
110inti@inti-VirtualBox:~$ ls
111Desktop Documents Downloads Music Pictures Public Templates Videos
112inti@inti-VirtualBox:~$ mkdir Projects
113inti@inti-VirtualBox:~$ cd Projects/
114inti@inti-VirtualBox:~/Projects$ ls
115inti@inti-VirtualBox:~/Projects$ git clone -b develop git@github.com:ByINTI/credencial-api.git
116Cloning into 'credencial-api'...
117remote: Enumerating objects: 981, done.
118remote: Counting objects: 100% (981/981), done.
119remote: Compressing objects: 100% (511/511), done.
120remote: Total 981 (delta 644), reused 789 (delta 452), pack-reused 0
121Receiving objects: 100% (981/981), 191.80 KiB | 556.00 KiB/s, done.
122Resolving deltas: 100% (644/644), done.
123inti@inti-VirtualBox:~/Projects$ cd credencial-api && make begin-project
124cp .env.development .env
125docker-compose down
126Removing network credencial-api_development-network
127WARNING: Network credencial-api_development-network not found.
128sudo rm -rf .volumes node_modules
129mkdir -p .volumes/postgres
130mkdir -p .volumes/pgadmin
131sudo chown 5050:5050 .volumes/pgadmin
132docker-compose build --force-rm --no-cache app
133Building app
134Step 1/15 : FROM node:13-alpine
13513-alpine: Pulling from library/node
136aad63a933944: Pull complete
137a00bd932208e: Pull complete
138c57f2c59b937: Pull complete
139f3446470f297: Pull complete
140Digest: sha256:a01be76692924db83442d93b3bfde3a0cd56ddcacf3047f583a0a98ddf7a31de
141Status: Downloaded newer image for node:13-alpine
142 ---> 483343d6c5f5
143Step 2/15 : ARG NODE_ENV=production
144 ---> Running in c0d0d28eeb08
145Removing intermediate container c0d0d28eeb08
146 ---> b6f320a4b9c3
147Step 3/15 : ENV NODE_ENV $NODE_ENV
148 ---> Running in 892623baecaa
149Removing intermediate container 892623baecaa
150 ---> a105039f8485
151Step 4/15 : ARG PORT=3000
152 ---> Running in f30aa35feaf1
153Removing intermediate container f30aa35feaf1
154 ---> 22312a5258a9
155Step 5/15 : ENV PORT $PORT
156 ---> Running in 20ad52d8901d
157Removing intermediate container 20ad52d8901d
158 ---> 90b956fdf74c
159Step 6/15 : EXPOSE $PORT 9229 9230
160 ---> Running in 6ed7906d11c0
161Removing intermediate container 6ed7906d11c0
162 ---> e0671ffb77da
163Step 7/15 : RUN npm i npm@latest knex -g
164 ---> Running in 4daf1b712584
165npm WARN deprecated resolve-url@0.2.1: https://github.com/lydell/resolve-url#deprecated
166npm WARN deprecated urix@0.1.0: Please see https://github.com/lydell/urix#deprecated
167/usr/local/bin/knex -> /usr/local/lib/node_modules/knex/bin/cli.js
168/usr/local/bin/npx -> /usr/local/lib/node_modules/npm/bin/npx-cli.js
169/usr/local/bin/npm -> /usr/local/lib/node_modules/npm/bin/npm-cli.js
170+ npm@6.14.4
171+ knex@0.20.13
172added 160 packages from 132 contributors and updated 1 package in 61.077s
173Removing intermediate container 4daf1b712584
174 ---> 58f252d8d54d
175Step 8/15 : RUN mkdir -p /opt/node_app/node_modules && chown -R node:node /opt/node_app
176 ---> Running in 9239070fcc47
177Removing intermediate container 9239070fcc47
178 ---> f553ae6f92d0
179Step 9/15 : WORKDIR /opt/node_app
180 ---> Running in 1a68a21c85e6
181Removing intermediate container 1a68a21c85e6
182 ---> 307f05235e78
183Step 10/15 : USER node
184 ---> Running in af6691e86464
185Removing intermediate container af6691e86464
186 ---> 3bf4a66ec085
187Step 11/15 : COPY package.json package-lock.json* ./
188 ---> 181e6791b1b0
189Step 12/15 : RUN npm install && npm cache clean --force
190 ---> Running in e877e8dde20e
191
192> bcrypt@4.0.1 install /opt/node_app/node_modules/bcrypt
193> node-pre-gyp install --fallback-to-build
194
195node-pre-gyp WARN Using request for node-pre-gyp https download
196[bcrypt] Success: "/opt/node_app/node_modules/bcrypt/lib/binding/napi-v3/bcrypt_lib.node" is installed via remote
197
198> nodemon@2.0.2 postinstall /opt/node_app/node_modules/nodemon
199> node bin/postinstall || exit 0
200
201Love nodemon? You can now support the project via the open collective:
202 > https://opencollective.com/nodemon/donate
203
204npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@1.2.11 (node_modules/@babel/cli/node_modules/fsevents):
205npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@1.2.11: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"x64"})
206npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@2.1.2 (node_modules/fsevents):
207npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@2.1.2: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"x64"})
208
209added 595 packages from 371 contributors and audited 5531 packages in 14.242s
210
2118 packages are looking for funding
212 run `npm fund` for details
213
214found 3 low severity vulnerabilities
215 run `npm audit fix` to fix them, or `npm audit` for details
216npm WARN using --force I sure hope you know what you are doing.
217Removing intermediate container e877e8dde20e
218 ---> 8e2cec2b6b94
219Step 13/15 : ENV PATH /opt/node_app/node_modules/.bin:$PATH
220 ---> Running in e225be221916
221Removing intermediate container e225be221916
222 ---> 524527fb293f
223Step 14/15 : WORKDIR /opt/node_app/app
224 ---> Running in 26ef53fdf2d7
225Removing intermediate container 26ef53fdf2d7
226 ---> dd8dec5fbfe3
227Step 15/15 : COPY . .
228 ---> aabe763b33bb
229Successfully built aabe763b33bb
230Successfully tagged credencial-api_app:latest
231Creating network "credencial-api_development-network" with driver "bridge"
232Creating volume "credencial-api_postgres" with local driver
233Creating volume "credencial-api_notused" with default driver
234Building app
235Step 1/15 : FROM node:13-alpine
236 ---> 483343d6c5f5
237Step 2/15 : ARG NODE_ENV=production
238 ---> Using cache
239 ---> b6f320a4b9c3
240Step 3/15 : ENV NODE_ENV $NODE_ENV
241 ---> Using cache
242 ---> a105039f8485
243Step 4/15 : ARG PORT=3000
244 ---> Using cache
245 ---> 22312a5258a9
246Step 5/15 : ENV PORT $PORT
247 ---> Using cache
248 ---> 90b956fdf74c
249Step 6/15 : EXPOSE $PORT 9229 9230
250 ---> Using cache
251 ---> e0671ffb77da
252Step 7/15 : RUN npm i npm@latest knex -g
253 ---> Using cache
254 ---> 58f252d8d54d
255Step 8/15 : RUN mkdir -p /opt/node_app/node_modules && chown -R node:node /opt/node_app
256 ---> Using cache
257 ---> f553ae6f92d0
258Step 9/15 : WORKDIR /opt/node_app
259 ---> Using cache
260 ---> 307f05235e78
261Step 10/15 : USER node
262 ---> Using cache
263 ---> 3bf4a66ec085
264Step 11/15 : COPY package.json package-lock.json* ./
265 ---> Using cache
266 ---> 181e6791b1b0
267Step 12/15 : RUN npm install && npm cache clean --force
268 ---> Using cache
269 ---> 8e2cec2b6b94
270Step 13/15 : ENV PATH /opt/node_app/node_modules/.bin:$PATH
271 ---> Using cache
272 ---> 524527fb293f
273Step 14/15 : WORKDIR /opt/node_app/app
274 ---> Using cache
275 ---> dd8dec5fbfe3
276Step 15/15 : COPY . .
277 ---> Using cache
278 ---> aabe763b33bb
279Successfully built aabe763b33bb
280Successfully tagged credencial-api_app:latest
281Pulling postgres (postgres:10.4)...
28210.4: Pulling from library/postgres
283be8881be8156: Pull complete
284bcc05f43b4de: Pull complete
28578c4cc9b5f06: Pull complete
286d45b5ac60cd5: Pull complete
28767f823cf5f8b: Pull complete
2880626c6149c90: Pull complete
289e25dcd1f62ca: Pull complete
290c3c9ac2352c5: Pull complete
291e7850488cb30: Pull complete
292afbae3a26c07: Pull complete
29390b4f1aa8431: Pull complete
294916671d3d4a6: Pull complete
2958221e20bcbad: Pull complete
296b2eb8d065dc9: Pull complete
297Digest: sha256:9625c2fb34986a49cbf2f5aa225d8eb07346f89f7312f7c0ea19d82c3829fdaa
298Status: Downloaded newer image for postgres:10.4
299Pulling pgadmin (dpage/pgadmin4:latest)...
300latest: Pulling from dpage/pgadmin4
3014167d3e14976: Pull complete
3021baf8a687be7: Pull complete
303c76509a1f144: Pull complete
304309d8543d55b: Pull complete
30537b423a1c32f: Pull complete
306c05e20d6543d: Pull complete
3078bd6c7d6cf1c: Pull complete
30860376b5f6b4a: Pull complete
309a825c9f15adc: Pull complete
310f26803fec2e4: Pull complete
311c91ced45f229: Pull complete
312703645e001c2: Pull complete
3139fc07e32e9db: Pull complete
3148161f20a56f3: Pull complete
315b33d85ba57a5: Pull complete
3165bb414f6c26a: Pull complete
3179273cf29c344: Pull complete
318Digest: sha256:17d0443fc8ece58f70e8d5b1ff4aa97b04235b43174c571da937b7a888a87826
319Status: Downloaded newer image for dpage/pgadmin4:latest
320Creating credencial-api_postgres_1 ... done
321Creating credencial-api_app_1 ... done
322Creating credencial-api_pgadmin_1 ... done
323Using environment: development
324Batch 1 run: 17 migrations
325Using environment: development
326Ran 11 seed files
327Attaching to credencial-api_app_1
328app_1 |
329app_1 | > credencial-api@0.0.0 nodemon /opt/node_app/app
330app_1 | > nodemon --inspect=0.0.0.0:9229 -r esm src/server.js
331app_1 |
332app_1 | [nodemon] 2.0.2
333app_1 | [nodemon] reading config ./nodemon.json
334app_1 | [nodemon] to restart at any time, enter `rs`
335app_1 | [nodemon] or send SIGHUP to 17 to restart
336app_1 | [nodemon] ignoring: ./.git/**/* node_modules/**/node_modules dist
337app_1 | [nodemon] watching dir(s): *.*
338app_1 | [nodemon] watching extensions: js,mjs,json
339app_1 | [nodemon] starting `node --inspect=0.0.0.0:9229 -r esm src/server.js`
340app_1 | [nodemon] spawning
341app_1 | [nodemon] child pid: 29
342app_1 | Debugger listening on ws://0.0.0.0:9229/7bf2a4b2-f9da-44ff-8da6-d1567edbea45
343app_1 | For help, see: https://nodejs.org/en/docs/inspector
344app_1 | [nodemon] watching 99 files
345app_1 | Sat, 04 Apr 2020 19:49:09 GMT morgan deprecated default format: use combined format at ../node_modules/esm/esm.js:1:278827
346app_1 | API na url http://localhost:3000
347app_1 | GET / 200 9.304 ms - 21
348app_1 | GET /favicon.ico 404 1.692 ms - 150