Skip to content

Docker set up failed on ubuntu 20.04 #38

@graham-u

Description

@graham-u

Using these steps I get errors when trying to set up the project.

git clone https://github.com/yearn-integrations/yearn-api.git
cd yearn-api
cp .env.example .env
docker-compose up

Output was as follows on the docker-compose up step

docker-compose up
Creating network "yearn-api_default" with the default driver
Building serverless
Step 1/8 : FROM node:14-buster
14-buster: Pulling from library/node
e4c3d3e4f7b0: Pull complete
101c41d0463b: Pull complete
8275efcd805f: Pull complete
751620502a7a: Pull complete
0a5e725150a2: Pull complete
7e1f45686e96: Pull complete
708db31e2a9b: Pull complete
fe2db47fa4c5: Pull complete
3198ee277bf8: Pull complete
Digest: sha256:daee3fa083f4e4d23635c13e5c9f6c81fc22bc1e2c3c5b9b32b97fb7a2e5fd83
Status: Downloaded newer image for node:14-buster
 ---> 4ca77652bcc4
Step 2/8 : RUN npm install -g serverless &&     npm install -g serverless-offline
 ---> Running in a65c30b09787
npm WARN deprecated [email protected]: request-promise-native has been deprecated because it extends the now deprecated request package, see https://github.com/request/request/issues/3142
npm WARN deprecated [email protected]: request has been deprecated, see https://github.com/request/request/issues/3142
npm WARN deprecated [email protected]: this library is no longer supported
/usr/local/bin/serverless -> /usr/local/lib/node_modules/serverless/bin/serverless.js
/usr/local/bin/sls -> /usr/local/lib/node_modules/serverless/bin/serverless.js

> [email protected] install /usr/local/lib/node_modules/serverless/node_modules/snappy
> prebuild-install || node-gyp rebuild

prebuild-install WARN install EACCES: permission denied, access '/root/.npm'
gyp WARN EACCES current user ("nobody") does not have permission to access the dev dir "/root/.cache/node-gyp/14.14.0"
gyp WARN EACCES attempting to reinstall using temporary dev dir "/usr/local/lib/node_modules/serverless/node_modules/snappy/.node-gyp"
gyp WARN install got an error, rolling back install
gyp WARN install got an error, rolling back install
gyp ERR! configure error 
gyp ERR! stack Error: EACCES: permission denied, mkdir '/usr/local/lib/node_modules/serverless/node_modules/snappy/.node-gyp'
gyp ERR! System Linux 5.4.0-47-generic
gyp ERR! command "/usr/local/bin/node" "/usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
gyp ERR! cwd /usr/local/lib/node_modules/serverless/node_modules/snappy
gyp ERR! node -v v14.14.0
gyp ERR! node-gyp -v v5.1.0
gyp ERR! not ok 

> [email protected] postinstall /usr/local/lib/node_modules/serverless/node_modules/protobufjs
> node scripts/postinstall


> [email protected] postinstall /usr/local/lib/node_modules/serverless
> node ./scripts/postinstall.js


   ┌───────────────────────────────────────────────────┐
   │                                                   │
   │   Serverless Framework successfully installed!    │
   │                                                   │
   │   To start your first project run 'serverless'.   │
   │                                                   │
   └───────────────────────────────────────────────────┘

npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@~2.1.2 (node_modules/serverless/node_modules/chokidar/node_modules/fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for [email protected]: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"x64"})
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: [email protected] (node_modules/serverless/node_modules/snappy):
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: [email protected] install: `prebuild-install || node-gyp rebuild`
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: Exit status 1

+ [email protected]
added 602 packages from 458 contributors in 113.445s
npm WARN deprecated @hapi/[email protected]: This version has been deprecated and is no longer supported or maintained
npm WARN deprecated @hapi/[email protected]: This version contains severe security issues and defects and should not be used! Please upgrade to the latest version of @hapi/hapi or consider a commercial license (https://github.com/hapijs/hapi/issues/4114)
npm WARN deprecated @hapi/[email protected]: This version has been deprecated and is no longer supported or maintained
npm WARN deprecated @hapi/[email protected]: joi is leaving the @hapi organization and moving back to 'joi' (https://github.com/sideway/joi/issues/2411)
npm WARN deprecated @hapi/[email protected]: This version has been deprecated and is no longer supported or maintained
npm WARN deprecated @hapi/[email protected]: This version has been deprecated and is no longer supported or maintained
npm WARN deprecated @hapi/[email protected]: This version has been deprecated and is no longer supported or maintained
npm WARN deprecated @hapi/[email protected]: This version has been deprecated and is no longer supported or maintained
npm WARN deprecated @hapi/[email protected]: This version has been deprecated and is no longer supported or maintained
npm WARN deprecated @hapi/[email protected]: This version has been deprecated and is no longer supported or maintained
npm WARN deprecated @hapi/[email protected]: joi is leaving the @hapi organization and moving back to 'joi' (https://github.com/sideway/joi/issues/2411)
npm WARN deprecated @hapi/[email protected]: This version has been deprecated and is no longer supported or maintained
npm WARN deprecated @hapi/[email protected]: This version has been deprecated and is no longer supported or maintained
npm WARN deprecated @hapi/[email protected]: This version has been deprecated and is no longer supported or maintained
npm WARN deprecated @hapi/[email protected]: This version has been deprecated and is no longer supported or maintained
npm WARN deprecated @hapi/[email protected]: This version has been deprecated and is no longer supported or maintained
npm WARN deprecated @hapi/[email protected]: This version has been deprecated and is no longer supported or maintained
npm WARN deprecated @hapi/[email protected]: This version has been deprecated and is no longer supported or maintained
npm WARN deprecated @hapi/[email protected]: This version has been deprecated and is no longer supported or maintained
npm WARN deprecated @hapi/[email protected]: This version has been deprecated and is no longer supported or maintained
npm WARN deprecated @hapi/[email protected]: This version has been deprecated and is no longer supported or maintained
npm WARN deprecated @hapi/[email protected]: This version has been deprecated and is no longer supported or maintained
npm WARN deprecated @hapi/[email protected]: This version has been deprecated and is no longer supported or maintained
npm WARN deprecated @hapi/[email protected]: This version has been deprecated and is no longer supported or maintained
npm WARN deprecated @hapi/[email protected]: This version has been deprecated and is no longer supported or maintained
npm WARN deprecated @hapi/[email protected]: This version has been deprecated and is no longer supported or maintained
npm WARN deprecated @hapi/[email protected]: This version has been deprecated and is no longer supported or maintained
npm WARN deprecated @hapi/[email protected]: This version has been deprecated and is no longer supported or maintained
npm WARN deprecated @hapi/[email protected]: This version has been deprecated and is no longer supported or maintained
npm WARN deprecated @hapi/[email protected]: This version has been deprecated and is no longer supported or maintained
npm WARN deprecated @hapi/[email protected]: This version has been deprecated and is no longer supported or maintained
npm WARN deprecated @hapi/[email protected]: This version has been deprecated and is no longer supported or maintained
npm WARN deprecated @hapi/[email protected]: This version has been deprecated and is no longer supported or maintained
npm WARN [email protected] requires a peer of serverless@>=1.60.0 but none is installed. You must install peer dependencies yourself.

+ [email protected]
added 238 packages from 285 contributors in 49.5s
Removing intermediate container a65c30b09787
 ---> cc35abb5bb44
Step 3/8 : WORKDIR /opt/app
 ---> Running in 8997b8069e22
Removing intermediate container 8997b8069e22
 ---> e2ebff82a7cc
Step 4/8 : COPY package*.json ./
 ---> 5e066765a876
Step 5/8 : RUN npm install
 ---> Running in b6814fd75246

> [email protected] install /opt/app/node_modules/keccak
> node-gyp-build || exit 0


> [email protected] install /opt/app/node_modules/bufferutil
> node-gyp-build


> [email protected] install /opt/app/node_modules/secp256k1
> node-gyp-build || exit 0


> [email protected] install /opt/app/node_modules/utf-8-validate
> node-gyp-build


> [email protected] postinstall /opt/app/node_modules/web3
> node angular-patch.js

npm WARN app No description
npm WARN app No repository field.
npm WARN app No license field.

added 539 packages from 568 contributors and audited 539 packages in 38.161s

32 packages are looking for funding
  run `npm fund` for details

found 1 low severity vulnerability
  run `npm audit fix` to fix them, or `npm audit` for details
Removing intermediate container b6814fd75246
 ---> d7b159e4bd9e
Step 6/8 : COPY . .
 ---> a97b0dc89c09
Step 7/8 : EXPOSE 3000
 ---> Running in b24bc47ffaa1
Removing intermediate container b24bc47ffaa1
 ---> 1e57b61c7caf
Step 8/8 : CMD [ "sls", "offline", "--host", "0.0.0.0" ]
 ---> Running in 7efbe3942676
Removing intermediate container 7efbe3942676
 ---> 1d23f079b67e

Successfully built 1d23f079b67e
Successfully tagged yearn-api_serverless:latest
WARNING: Image for service serverless was built because it did not already exist. To rebuild this image you must use `docker-compose build` or `docker-compose up --build`.
Creating yearn-api_serverless_1 ... 
Creating yearn-api_serverless_1 ... error

ERROR: for yearn-api_serverless_1  Cannot start service serverless: driver failed programming external connectivity on endpoint yearn-api_serverless_1 (f2f66be88342ac46def47c4b79394425cee290dd1baa8753b199ccf93a758dda): Error starting userland proxy: listen tcp 0.0.0.0:3000: bind: address already in use

ERROR: for serverless  Cannot start service serverless: driver failed programming external connectivity on endpoint yearn-api_serverless_1 (f2f66be88342ac46def47c4b79394425cee290dd1baa8753b199ccf93a758dda): Error starting userland proxy: listen tcp 0.0.0.0:3000: bind: address already in use
ERROR: Encountered errors while bringing up the project.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions