unlock-protocol / unlock

Ʉnlock is a protocol for memberships built on a blockchain.
https://unlock-protocol.com
MIT License
839 stars 248 forks source link

docker build failed with locksmith-migration #7069

Closed caosbad closed 2 years ago

caosbad commented 3 years ago

Describe the bug When run docker-compose got failed error

Building locksmith-migration
Step 1/11 : FROM unlock-core
ERROR: Service 'locksmith-migration' failed to build: pull access denied for unlock-core, repository does not exist or may require 'docker login': denied: requested access to the resource is denied

To Reproduce Steps to reproduce the behavior: run

  1. cd docker && docker-compose up --build

Expected behavior runing success with docker

Screenshots If applicable, add screenshots to help explain your problem.

Desktop (please complete the following information):

Additional context

➜  docker git:(bsc) ✗ docker-compose up --buildBuilding ganache
Step 1/17 : FROM trufflesuite/ganache-cli:v6.9.1
 ---> 40b011a5f8e5
Step 2/17 : LABEL Unlock <ops@unlock-protocol.com>
 ---> Using cache
 ---> 4ffdc6b9d6b4
Step 3/17 : RUN apk add --no-cache git openssh bash
 ---> Using cache
 ---> 2785de149903
Step 4/17 : RUN apk add --no-cache   python   python-dev   py-pip   build-base   && pip install virtualenv
 ---> Using cache
 ---> 9960ca9b84c8
Step 5/17 : RUN npm install -g npm@6.4.1
 ---> Using cache
 ---> 6004c75c89d6
Step 6/17 : RUN npm install -g yarn
 ---> Using cache
 ---> c6f5f2094526
Step 7/17 : RUN mkdir /standup
 ---> Using cache
 ---> b522cc5a4d18
Step 8/17 : WORKDIR /standup
 ---> Using cache
 ---> 9f24a5d401e2
Step 9/17 : COPY ./package.json ./
 ---> Using cache
 ---> 8311edb69f3b
Step 10/17 : RUN yarn
 ---> Using cache
 ---> ed4c08556186
Step 11/17 : COPY ./* ./
 ---> Using cache
 ---> 8d6655d39c2e
Step 12/17 : COPY ./utils/* ./utils/
 ---> Using cache
 ---> 3d19f95b01bb
Step 13/17 : WORKDIR /app
 ---> Using cache
 ---> 7ec259e67013
Step 14/17 : COPY ./standup.sh .
 ---> Using cache
 ---> d109e3970ae3
Step 15/17 : ENV DOCKER true
 ---> Using cache
 ---> 84aa891e119a
Step 16/17 : EXPOSE 8545
 ---> Using cache
 ---> d747c6bef605
Step 17/17 : ENTRYPOINT /app/standup.sh
 ---> Using cache
 ---> 9c347549af8b
Successfully built 9c347549af8b
Successfully tagged docker_ganache:latest
Building ganache-standup
Step 1/17 : FROM trufflesuite/ganache-cli:v6.9.1
 ---> 40b011a5f8e5
Step 2/17 : LABEL Unlock <ops@unlock-protocol.com>
 ---> Using cache
 ---> 4ffdc6b9d6b4
Step 3/17 : RUN apk add --no-cache git openssh bash
 ---> Using cache
 ---> 2785de149903
Step 4/17 : RUN apk add --no-cache   python   python-dev   py-pip   build-base   && pip install virtualenv
 ---> Using cache
 ---> 9960ca9b84c8
Step 5/17 : RUN npm install -g npm@6.4.1
 ---> Using cache
 ---> 6004c75c89d6
Step 6/17 : RUN npm install -g yarn
 ---> Using cache
 ---> c6f5f2094526
Step 7/17 : RUN mkdir /standup
 ---> Using cache
 ---> b522cc5a4d18
Step 8/17 : WORKDIR /standup
 ---> Using cache
 ---> 9f24a5d401e2
Step 9/17 : COPY ./package.json ./
 ---> Using cache
 ---> 8311edb69f3b
Step 10/17 : RUN yarn
 ---> Using cache
 ---> ed4c08556186
Step 11/17 : COPY ./* ./
 ---> Using cache
 ---> 8d6655d39c2e
Step 12/17 : COPY ./utils/* ./utils/
 ---> Using cache
 ---> 3d19f95b01bb
Step 13/17 : WORKDIR /app
 ---> Using cache
 ---> 7ec259e67013
Step 14/17 : COPY ./standup.sh .
 ---> Using cache
 ---> d109e3970ae3
Step 15/17 : ENV DOCKER true
 ---> Using cache
 ---> 84aa891e119a
Step 16/17 : EXPOSE 8545
 ---> Using cache
 ---> d747c6bef605
Step 17/17 : ENTRYPOINT /app/standup.sh
 ---> Using cache
 ---> 9c347549af8b
Successfully built 9c347549af8b
Successfully tagged ganache-standup:latest
Building subgraph_deployment
Step 1/13 : FROM node:10.24.0-alpine
 ---> 9bfaa3adc4e1
Step 2/13 : LABEL Graph Protocol Subgraph <ops@unlock-protocol.com>
 ---> Using cache
 ---> e2d8edf29e26
Step 3/13 : LABEL maintainer="ops@unlock-protocol.com"
 ---> Using cache
 ---> 6a366bf3d4a1
Step 4/13 : RUN apk add --no-cache git openssh libsecret-dev
 ---> Using cache
 ---> 5a581bf07c4b
Step 5/13 : RUN apk add --no-cache     python     python-dev     py-pip     build-base     && pip install virtualenv
 ---> Using cache
 ---> 5255e504ea1a
Step 6/13 : RUN npm install -g npm@6.4.1
 ---> Using cache
 ---> 3d797694a227
Step 7/13 : ADD https://api.github.com/repos/unlock-protocol/unlock-subgraph/git/matching-refs/heads/master version.json

 ---> Using cache
 ---> 455a5404e146
Step 8/13 : RUN git clone https://github.com/unlock-protocol/unlock-subgraph.git
 ---> Using cache
 ---> 1335600eb4e4
Step 9/13 : WORKDIR /unlock-subgraph
 ---> Using cache
 ---> 5186029e5c32
Step 10/13 : COPY --chown=node ./deploy-subgraph.js /unlock-subgraph/.
 ---> Using cache
 ---> 1d0e9174b076
Step 11/13 : RUN npm ci
 ---> Using cache
 ---> 4b764782e94e
Step 12/13 : RUN ["npm", "run", "generate-subgraph-yaml"]
 ---> Using cache
 ---> 66cad65b0495
Step 13/13 : RUN ["npm", "run", "codegen"]
 ---> Using cache
 ---> 5e5c1c904707
Successfully built 5e5c1c904707
Successfully tagged docker_subgraph_deployment:latest
Building locksmith-migration
Step 1/11 : FROM unlock-core
ERROR: Service 'locksmith-migration' failed to build: pull access denied for unlock-core, repository does not exist or may require 'docker login': denied: requested access to the resource is denied
julien51 commented 3 years ago

Thanks. Can you try adding @unlock-protocol/unlock-core locally first?

caosbad commented 3 years ago

@julien51 Did you mean the npm package named @unlock-protocol/unlock-core ? I can't find it on npm~

julien51 commented 3 years ago

Ho no sorry, I meant unlockprotocol/unlock-core. Just run docker pull unlockprotocol/unlock-core first and then you should be good to build ?

caosbad commented 3 years ago

@julien51 run docker pull unlockprotocol/unlock-core done, but still not work, should I need to change the config file LOCKSMITH_PURCHASER_ADDRESS ? And Im not sure what's that config mean.

caosbad commented 3 years ago

Change the dockfile content FROM unlock-core to FROM unlockprotocol/unlock-core can build success , should I replace them all ?

julien51 commented 3 years ago

Sorry for the delays here.

run docker pull unlockprotocol/unlock-core done, but still not work,

Same error?

should I need to change the config file LOCKSMITH_PURCHASER_ADDRESS ? And Im not sure what's that config mean.

You should not have to change this, I think.

Change the dockfile content FROM unlock-core to FROM unlockprotocol/unlock-core can build success , should I replace them all ?

So ideally we'd want to build from a unlock-core in case the image has been locally updated. We need to find a way to load unlock-core from unlockprotocol/unlock-core first.

Honestly I am not great with docker... so this probably needs to be refactored :(

ksteigerwald commented 3 years ago

I was able to load the locksmith image after namespacing unlock-core. Also I pulled unlockprotocol/unlock-core before changing it. Seems to be working fine now.