I create a docker swam on my localhost running this tutorial. I then create the examplary function using this tutorial. When doing faas-cli push -f hello-python.yml
I'm getting:
$ faas-cli push -f hello-python.yml
[0] > Pushing: hello-python.
The push refers to a repository [docker.io/library/hello-python]
b2a90e359469: Preparing
05a203ee051c: Preparing
6b94e240f4a0: Preparing
f7c0b336f1ba: Preparing
92b8df4ef228: Preparing
2cf17ef897d7: Waiting
bc09eab81965: Waiting
5a05e2c1de01: Waiting
15994f1f5ae9: Waiting
12211dbcbe79: Waiting
ef763da74d91: Waiting
denied: requested access to the resource is denied
2017/11/05 19:26:52 ERROR - Could not execute command: [docker push hello-python]
When doing the deploy command, the functions gets deployed. When doing the same procedure on my remote machine and therefore changing the gateway address in hello-python.yml, the output for push and deploy are the same: Pushing does not work, deploying does. The function even appears in the ui on the remote server, but cannot be invoked since it cannot be reached.
Hello @maxbry,
Can you confirm you have logged in to your docker hub account on the machine prior to attempting to push, please?
$ docker login
Login with your Docker ID to push and pull images from Docker Hub. If you don't have a Docker ID, head over to https://hub.docker.com to create one.
Username: maxbry
Password:
Login Succeeded
$ faas-cli push -f hello-python.yml
[0] > Pushing: hello-python.
The push refers to a repository [docker.io/library/hello-python]
b2a90e359469: Preparing
05a203ee051c: Preparing
6b94e240f4a0: Preparing
f7c0b336f1ba: Preparing
92b8df4ef228: Preparing
2cf17ef897d7: Waiting
bc09eab81965: Waiting
5a05e2c1de01: Waiting
15994f1f5ae9: Waiting
12211dbcbe79: Waiting
ef763da74d91: Waiting
denied: requested access to the resource is denied
2017/11/05 20:17:51 ERROR - Could not execute command: [docker push hello-python]
Cool. So now, if you haven't done so already, you need to edit your hello-python.yml to add your account/user namespace to the front of the image name:
functions:
hello-python:
lang: python
handler: ./hello-python
image: hello-python
becomes:
functions:
hello-python:
lang: python
handler: ./hello-python
image: <username>/hello-python
Richard is correct, you'll need to specify your Docker Hub account there under the image: prefix.
Ah great, that solved it!
Derek close
No probs Maxbry. Let us know if we can help again.
Most helpful comment
Cool. So now, if you haven't done so already, you need to edit your
hello-python.ymlto add your account/user namespace to the front of the image name:becomes: