Building custom app - authentication problem
-
@ekevu123 said in Building custom app - authentication problem:
and uninstalling the app via CLI immediately solved it.
FWIW when I am building a custom app and I make changes to the Dockerfile, it is my standard process to uninstall the last app version before seeking to build and deploy the next version.
Technically this might be unnecessary, but for my little brain, I find it easier to know that I am starting 'clean'.
I usually uninstall via the app's settings screen, but I guess from CLI is same and might be easier if you're working on command line anyway.I also use a little script
cld.sh
(call it whatever you want, I save keystrokes where possible) :#/bin/bash docker build --no-cache -t $1 . docker push $1 cloudron install --image $1
and I run this it this :
./cld.sh <repository_url>/<app_name>:<tag>
I hack my way through multiple trial-and-error builds, and this saves a lot of time, keystrokes and typos.Maybe you have your own workflow efficiencies
-
To summarise, my issue is this. When running "cloudron build", I get this error:
error parsing HTTP 403 response body: invalid character '<' looking for beginning of value: "<html>\r\n<head><title>403 Forbidden</title></head>\r\n<body>\r\n<center><h1>403 Forbidden</h1></center>\r\n<hr><center>nginx</center>\r\n</body>\r\n</html>\r\n"
Failed to push image (are you logged in? if not, use "docker login")But I ran docker login before this step. I completely deleted all Cloudron CLI configuration and re-installed it without any effect.
-
@ekevu123 I would first check if
docker push
works? Can you confirm ?I also found two related links:
- https://superuser.com/questions/1389039/docker-error-parsing-http-403-response-body-invalid-character-looking-for says this might be cause docker push access does not work from network
- https://stackoverflow.com/questions/32900830/docker-http-code-403-while-uploading-metadata-invalid-character-looking-f says it's maybe an auth issue with docker hub
-
No, I am getting the issue when running docker push.
I also suspect that it is an IP restriction because I am currently in Malaysia. So, I contacted Docker support about it. The only other solution I could think of then would be to change the docker repo provider to Google or something.
-
Docker pull and docker push works fine now and docker didn't confirm any IP restriction.
I could now build the app using cloudron build but I am getting this when I am trying to install it:
App installation error: Installation failed: Unable to pull image PATH:tag. message: (HTTP code 404) unexpected - pull access denied for PATH, repository does not exist or may require 'docker login': denied: requested access to the resource is denied statusCode: 404But the path is right, I used --set-repository to check and it's the same I use for docker pull and docker push.
Is it possible that for whatever reason Cloudron cannot authenticate with Docker in my case?
EDIT: It works when making the repository public.
-
@ekevu123
https://docs.cloudron.io/settings/#private-docker-registryDid you take this into account?
-
Yes, I did.
I corrected some other errors and finally got the message "app is installed" at some point without any error message. However, once that is the case, I cannot access the dashboard anymore (it stays grey, see above) until I uninstall the app.
Maybe that is a support case after all where you ssh into my instance?