· 6 years ago · Apr 04, 2020, 07:56 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$
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134inti@inti-VirtualBox:~/Projects$ ls
135inti@inti-VirtualBox:~/Projects$ git clone -b develop git@github.com:ByINTI/credencial-api.git
136Cloning into 'credencial-api'...
137remote: Enumerating objects: 981, done.
138remote: Counting objects: 100% (981/981), done.
139remote: Compressing objects: 100% (511/511), done.
140remote: Total 981 (delta 644), reused 789 (delta 452), pack-reused 0
141Receiving objects: 100% (981/981), 191.80 KiB | 556.00 KiB/s, done.
142Resolving deltas: 100% (644/644), done.
143inti@inti-VirtualBox:~/Projects$ cd credencial-api && make begin-project
144cp .env.development .env
145docker-compose down
146Removing network credencial-api_development-network
147WARNING: Network credencial-api_development-network not found.
148sudo rm -rf .volumes node_modules
149mkdir -p .volumes/postgres
150mkdir -p .volumes/pgadmin
151sudo chown 5050:5050 .volumes/pgadmin
152docker-compose build --force-rm --no-cache app
153Building app
154Step 1/15 : FROM node:13-alpine
15513-alpine: Pulling from library/node
156aad63a933944: Pull complete
157a00bd932208e: Pull complete
158c57f2c59b937: Pull complete
159f3446470f297: Pull complete
160Digest: sha256:a01be76692924db83442d93b3bfde3a0cd56ddcacf3047f583a0a98ddf7a31de
161Status: Downloaded newer image for node:13-alpine
162 ---> 483343d6c5f5
163Step 2/15 : ARG NODE_ENV=production
164 ---> Running in c0d0d28eeb08
165Removing intermediate container c0d0d28eeb08
166 ---> b6f320a4b9c3
167Step 3/15 : ENV NODE_ENV $NODE_ENV
168 ---> Running in 892623baecaa
169Removing intermediate container 892623baecaa
170 ---> a105039f8485
171Step 4/15 : ARG PORT=3000
172 ---> Running in f30aa35feaf1
173Removing intermediate container f30aa35feaf1
174 ---> 22312a5258a9
175Step 5/15 : ENV PORT $PORT
176 ---> Running in 20ad52d8901d
177Removing intermediate container 20ad52d8901d
178 ---> 90b956fdf74c
179Step 6/15 : EXPOSE $PORT 9229 9230
180 ---> Running in 6ed7906d11c0
181Removing intermediate container 6ed7906d11c0
182 ---> e0671ffb77da
183Step 7/15 : RUN npm i npm@latest knex -g
184 ---> Running in 4daf1b712584
185npm WARN deprecated resolve-url@0.2.1: https://github.com/lydell/resolve-url#deprecated
186npm WARN deprecated urix@0.1.0: Please see https://github.com/lydell/urix#deprecated
187/usr/local/bin/knex -> /usr/local/lib/node_modules/knex/bin/cli.js
188/usr/local/bin/npx -> /usr/local/lib/node_modules/npm/bin/npx-cli.js
189/usr/local/bin/npm -> /usr/local/lib/node_modules/npm/bin/npm-cli.js
190+ npm@6.14.4
191+ knex@0.20.13
192added 160 packages from 132 contributors and updated 1 package in 61.077s
193Removing intermediate container 4daf1b712584
194 ---> 58f252d8d54d
195Step 8/15 : RUN mkdir -p /opt/node_app/node_modules && chown -R node:node /opt/node_app
196 ---> Running in 9239070fcc47
197Removing intermediate container 9239070fcc47
198 ---> f553ae6f92d0
199Step 9/15 : WORKDIR /opt/node_app
200 ---> Running in 1a68a21c85e6
201Removing intermediate container 1a68a21c85e6
202 ---> 307f05235e78
203Step 10/15 : USER node
204 ---> Running in af6691e86464
205Removing intermediate container af6691e86464
206 ---> 3bf4a66ec085
207Step 11/15 : COPY package.json package-lock.json* ./
208 ---> 181e6791b1b0
209Step 12/15 : RUN npm install && npm cache clean --force
210 ---> Running in e877e8dde20e
211
212> bcrypt@4.0.1 install /opt/node_app/node_modules/bcrypt
213> node-pre-gyp install --fallback-to-build
214
215node-pre-gyp WARN Using request for node-pre-gyp https download
216[bcrypt] Success: "/opt/node_app/node_modules/bcrypt/lib/binding/napi-v3/bcrypt_lib.node" is installed via remote
217
218> nodemon@2.0.2 postinstall /opt/node_app/node_modules/nodemon
219> node bin/postinstall || exit 0
220
221Love nodemon? You can now support the project via the open collective:
222 > https://opencollective.com/nodemon/donate
223
224npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@1.2.11 (node_modules/@babel/cli/node_modules/fsevents):
225npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@1.2.11: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"x64"})
226npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@2.1.2 (node_modules/fsevents):
227npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@2.1.2: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"x64"})
228
229added 595 packages from 371 contributors and audited 5531 packages in 14.242s
230
2318 packages are looking for funding
232 run `npm fund` for details
233
234found 3 low severity vulnerabilities
235 run `npm audit fix` to fix them, or `npm audit` for details
236npm WARN using --force I sure hope you know what you are doing.
237Removing intermediate container e877e8dde20e
238 ---> 8e2cec2b6b94
239Step 13/15 : ENV PATH /opt/node_app/node_modules/.bin:$PATH
240 ---> Running in e225be221916
241Removing intermediate container e225be221916
242 ---> 524527fb293f
243Step 14/15 : WORKDIR /opt/node_app/app
244 ---> Running in 26ef53fdf2d7
245Removing intermediate container 26ef53fdf2d7
246 ---> dd8dec5fbfe3
247Step 15/15 : COPY . .
248 ---> aabe763b33bb
249Successfully built aabe763b33bb
250Successfully tagged credencial-api_app:latest
251Creating network "credencial-api_development-network" with driver "bridge"
252Creating volume "credencial-api_postgres" with local driver
253Creating volume "credencial-api_notused" with default driver
254Building app
255Step 1/15 : FROM node:13-alpine
256 ---> 483343d6c5f5
257Step 2/15 : ARG NODE_ENV=production
258 ---> Using cache
259 ---> b6f320a4b9c3
260Step 3/15 : ENV NODE_ENV $NODE_ENV
261 ---> Using cache
262 ---> a105039f8485
263Step 4/15 : ARG PORT=3000
264 ---> Using cache
265 ---> 22312a5258a9
266Step 5/15 : ENV PORT $PORT
267 ---> Using cache
268 ---> 90b956fdf74c
269Step 6/15 : EXPOSE $PORT 9229 9230
270 ---> Using cache
271 ---> e0671ffb77da
272Step 7/15 : RUN npm i npm@latest knex -g
273 ---> Using cache
274 ---> 58f252d8d54d
275Step 8/15 : RUN mkdir -p /opt/node_app/node_modules && chown -R node:node /opt/node_app
276 ---> Using cache
277 ---> f553ae6f92d0
278Step 9/15 : WORKDIR /opt/node_app
279 ---> Using cache
280 ---> 307f05235e78
281Step 10/15 : USER node
282 ---> Using cache
283 ---> 3bf4a66ec085
284Step 11/15 : COPY package.json package-lock.json* ./
285 ---> Using cache
286 ---> 181e6791b1b0
287Step 12/15 : RUN npm install && npm cache clean --force
288 ---> Using cache
289 ---> 8e2cec2b6b94
290Step 13/15 : ENV PATH /opt/node_app/node_modules/.bin:$PATH
291 ---> Using cache
292 ---> 524527fb293f
293Step 14/15 : WORKDIR /opt/node_app/app
294 ---> Using cache
295 ---> dd8dec5fbfe3
296Step 15/15 : COPY . .
297 ---> Using cache
298 ---> aabe763b33bb
299Successfully built aabe763b33bb
300Successfully tagged credencial-api_app:latest
301Pulling postgres (postgres:10.4)...
30210.4: Pulling from library/postgres
303be8881be8156: Pull complete
304bcc05f43b4de: Pull complete
30578c4cc9b5f06: Pull complete
306d45b5ac60cd5: Pull complete
30767f823cf5f8b: Pull complete
3080626c6149c90: Pull complete
309e25dcd1f62ca: Pull complete
310c3c9ac2352c5: Pull complete
311e7850488cb30: Pull complete
312afbae3a26c07: Pull complete
31390b4f1aa8431: Pull complete
314916671d3d4a6: Pull complete
3158221e20bcbad: Pull complete
316b2eb8d065dc9: Pull complete
317Digest: sha256:9625c2fb34986a49cbf2f5aa225d8eb07346f89f7312f7c0ea19d82c3829fdaa
318Status: Downloaded newer image for postgres:10.4
319Pulling pgadmin (dpage/pgadmin4:latest)...
320latest: Pulling from dpage/pgadmin4
3214167d3e14976: Pull complete
3221baf8a687be7: Pull complete
323c76509a1f144: Pull complete
324309d8543d55b: Pull complete
32537b423a1c32f: Pull complete
326c05e20d6543d: Pull complete
3278bd6c7d6cf1c: Pull complete
32860376b5f6b4a: Pull complete
329a825c9f15adc: Pull complete
330f26803fec2e4: Pull complete
331c91ced45f229: Pull complete
332703645e001c2: Pull complete
3339fc07e32e9db: Pull complete
3348161f20a56f3: Pull complete
335b33d85ba57a5: Pull complete
3365bb414f6c26a: Pull complete
3379273cf29c344: Pull complete
338Digest: sha256:17d0443fc8ece58f70e8d5b1ff4aa97b04235b43174c571da937b7a888a87826
339Status: Downloaded newer image for dpage/pgadmin4:latest
340Creating credencial-api_postgres_1 ... done
341Creating credencial-api_app_1 ... done
342Creating credencial-api_pgadmin_1 ... done
343Using environment: development
344Batch 1 run: 17 migrations
345Using environment: development
346Ran 11 seed files
347Attaching to credencial-api_app_1
348app_1 |
349app_1 | > credencial-api@0.0.0 nodemon /opt/node_app/app
350app_1 | > nodemon --inspect=0.0.0.0:9229 -r esm src/server.js
351app_1 |
352app_1 | [nodemon] 2.0.2
353app_1 | [nodemon] reading config ./nodemon.json
354app_1 | [nodemon] to restart at any time, enter `rs`
355app_1 | [nodemon] or send SIGHUP to 17 to restart
356app_1 | [nodemon] ignoring: ./.git/**/* node_modules/**/node_modules dist
357app_1 | [nodemon] watching dir(s): *.*
358app_1 | [nodemon] watching extensions: js,mjs,json
359app_1 | [nodemon] starting `node --inspect=0.0.0.0:9229 -r esm src/server.js`
360app_1 | [nodemon] spawning
361app_1 | [nodemon] child pid: 29
362app_1 | Debugger listening on ws://0.0.0.0:9229/7bf2a4b2-f9da-44ff-8da6-d1567edbea45
363app_1 | For help, see: https://nodejs.org/en/docs/inspector
364app_1 | [nodemon] watching 99 files
365app_1 | Sat, 04 Apr 2020 19:49:09 GMT morgan deprecated default format: use combined format at ../node_modules/esm/esm.js:1:278827
366app_1 | API na url http://localhost:3000
367app_1 | GET / 200 9.304 ms - 21
368app_1 | GET /favicon.ico 404 1.692 ms - 150