How do I do this??
-
Welp, I've had the first error, the exact type that has made Docker seem like some super bizarre esoteric only-true-devs-can-use-it, the very first time I've tried to follow @BrutalBirdie's instructions.
I've run this:
me@vm:~/cloudron/cloudron-odoo$ docker build --file Dockerfile --target docker.toutdo.com/org.odoo.cloudronapp:1.0.20 . [+] Building 0.3s (2/2) FINISHED => [internal] load build definition from Dockerfile 0.1s => => transferring dockerfile: 1.95kB 0.0s => [internal] load .dockerignore 0.2s => => transferring context: 74B 0.0s failed to solve with frontend dockerfile.v0: failed to create LLB definition: target stage docker.toutdo.com/org.odoo.cloudronapp:1.0.20 could not be found
Now, all you devs can see clear as day what I did wrong, but it isn't clear to me at all what I did wrong, especially since I followed the instructions. There are always assumptions that seem to exist, assumptions that a non-dev but wanna-be-dev person like me just miss. Clearly the error
docker.toutdo.com/org.odoo.cloudronapp:1.0.20 could not be found
is that this can't be found... but I looked to me, from the instructions, that it would be built and then "known". So do I just leave out this step? In fact, the very first time I ran this I left off the .me@vm:~/cloudron/cloudron-odoo$ docker build --file Dockerfile --target docker.toutdo.com/cloudron-odoo:1 "docker build" requires exactly 1 argument. See 'docker build --help'. Usage: docker build [OPTIONS] PATH | URL | - Build an image from a Dockerfile
I looked at that, then the instructions, telling myself, "look carefully, you left out something", and saw the space period. But this recent error? What the heck? I have to make this directory first? I named it wrong? Let me try without the "target". So now I'm running build without the --target, and 410s (2/3) in, it's still building.
The message at least tells me that it is looking in/pulling from
=> [internal] load metadata for docker.io/cloudron/base:3.2.0@sha256:ba1d566164a67c266782545ea9809dc611c4152e27686fd14060332dd88263ea
a cloudron source. So I guess it couldn't find one with the name I used for target; but it wasn't clear to me that the name had to be of an existing image. But I also can't find any reference to a ```docker.io/coudron/base:3.2" in this cloudron-odoo repository, so, how in the world did it know to use that?Well, this is a Help forum, not a "Teach Programming" forum, so I don't really expect anyone to spend more time trying to help me comprehend this stuff. I'll eventually get it. I hope. I just need to find a source which covers the "assumptions". Thanks again.
-
@scooke hope this is not a thick question but exactly which odoo repository are you cloning and building from ? Do you have a link?
I might give it a try.How it knows which base to use ? It is stated in the Dockerfile on the line
FROM .....
Keep persevering. I don't think people mind a blurred line between Help and Tutorial when the questions are good ones (as here).
-
@timconsidine yea the source would be really helpful for debugging.
-
-
git clone git@github.com:njsubedi/cloudron-odoo.git cd cloudron-odoo docker build --file Dockerfile --target dr.cloudron.dev/com.odoo.cloudronapp:0.0.1 . docker push dr.cloudron.dev/com.odoo.cloudronapp:0.0.1 cloudron install -l odoo.cloudron.dev --image dr.cloudron.dev/com.odoo.cloudronapp:0.0.1 App is being installed. => Queued => Registering subdomains => Registering location: odoo.cloudron.dev ....... => Setting up addons => Waiting for DNS propagation ... => Wait for health check ........... App is installed.
and: https://odoo.cloudron.dev
login is
admin:admin
all working for me. -
@timconsidine This is from @nj's github, https://github.com/njsubedi/cloudron-odoo
-
@BrutalBirdie Interesting... I'm at 3100+ seconds of build time, and it's still going.
Is that normal? I ran it without the --target option. -
me@VM:~/cloudron/cloudron-odoo$ docker build --file Dockerfile --target docker.toutdo.com/com.odoo.cloudronapp:0.0.1 . [+] Building 0.3s (2/2) FINISHED => [internal] load build definition from Dockerfile 0.1s => => transferring dockerfile: 38B 0.0s => [internal] load .dockerignore 0.1s => => transferring context: 34B 0.0s failed to solve with frontend dockerfile.v0: failed to create LLB definition: target stage docker.toutdo.com/com.odoo.cloudronapp:0.0.1 could not be found
I'm using my Docker Registery which I've installed at docker.toutdo.com, as you can see, but it's that same error about not finding it. I need to use dr.cloudron.dev (which I've been assuming can be changed)?
-
@scooke so MY terminal output for what you have above is :
TC-MBP-13:cloudron-odoo timconsidine$ docker build -t tcmbp132021/cloudron-odoo:a . [+] Building 139.3s (11/17) [+] Building 139.5s (11/17) => [internal] load build definition from Dockerfile 0.1ss => => transferring dockerfile: 1.95kB 0.1ss => [internal] load .dockerignore 0.1ss => => transferring context: 74B 0.0ss => [internal] load metadata for docker.io/cloudron/base:3.2.0@sha256:ba1d566164a67c266782545ea9809dc611c4152e27686fd14060332dd88263 33.5ss
I notice your output reports smaller file sizes
My first suspicion would be a network error.
Maybe compounded by you doing this in a local VM ?
I don't know, just taking wild stabs in the dark.
I don't think it is a process issues (commands), smells like network or environment issue to me. -
@timconsidine Could be. It's late where I am, so I'm hitting the hay. Thanks again, I'll take another stab in the morning!
-
I'm using my Docker Registery which I've installed at docker.toutdo.com, as you can see, but it's that same error about not finding it. I need to use dr.cloudron.dev (which I've been assuming can be changed)?
Yes, not just 'can', generally you should change it, because the image which is built goes into your repo that you have logged into.
-
@scooke the following from your message looks strange to me :
[+] Building 0.3s (2/2) FINISHED => [internal] load build definition from Dockerfile 0.1s => => transferring dockerfile: 38B
If I read that correctly, your build process only received a Dockerfile of 38Bytes.
My Dockerfile in the folder of the cloned repo is 1.9KB - NB kilobytes.
38B is hardly enough to specify the base image correctly, let alone the rest of the build instructions.Maybe do a directory listing and compare to the github listing ?
I withdraw my wild stab 'network' or 'environment' guess.
Instead I make a wild stab 'corrupt github clone' or 'corrupt github download / extraction'. -
@scooke another thought .....
I went back to your very first message in this topic, and noticed this.I'm also logged into my Cloudron using the cli on the Ubuntu VM
I might be reading this wrongly.
But I am NEVER logged in to my Cloudron server when I am building apps for deployment.
Raises the thought in my head : are you building the Odoo app actually on the Cloudron server ??!!
it should be built on local machine, then pushed to docker registry.
Thencloudron install etc
should be run locally which does the connection to the Cloudron server.
No need to be on the Cloudron server at all while building.I am still thinking the issue is mostly a corrupt clone from github.
But worth being clear where the build process is being run.Anyway, off to bed also.
-
I've resumed attempts, and keep failing on both my Ubuntu VM and Windows Terminal/Powershell:
=> => transferring context: 74B failed to solve with frontend dockerfile.v0: failed to create LLB definition: target stage dr.cloudron.dev/com.odoo.cloudronapp:0.0.1 could not be found
This seems like a network problem, but in my Docker I have what I think are all the correct options for integrating Windows Docker with WSL2 Ubuntu.
EDIT: In the last 30 minutes I have:
changed DNS setting in Docker Desktop (and back)
Changed "buildkit" from true to false (in Docker Desktop)
Deleted config.json in my Ubuntu ~/.docker directory
Cleaned and Purged in Desktop
Restarted Docker DesktopAnd after each of those, if my Ubuntu WSL was running, I'd restart.
I still keep getting:
Error response from daemon: failed to reach build target dr.cloudron.dev/com.odoo.cloudronapp:0.0.1 in Dockerfile
@timconsidine No, I'm not logged into my Cloudron box, this is all local.
Anyways, time for work, I'll come back later.
-
@scooke I did internet search for
failed to solve with frontend dockerfile.v0: failed to create LLB definition: target stage
This produced interesting comment on https://stackoverflow.com/questions/64221861/an-error-failed-to-solve-with-frontend-dockerfile-v0I had the same issue and all I had to do was to capitalize the Docker configuration filename: dockerfile > didn't work Dockerfile > did work
I see in your example earlier you are using the capitalised version.
But lower down in that thread it refers to "better practice" to usedocker build --file ./Dockerfile -t <etc>
to ensure it references folder in directory.
Personally I never use--file Dockerfile
as it is default.
Also see a comment about WSL and closing terminal.
Also a comment about usingDOCKER_BUILDKIT=0 docker build .
to track the exact error.
Have a read of thread and see if any of it applies.I would :
- close terminal and open it again
- cd to directory
- run
docker build -t docker.toutdo.com/com.odoo.cloudronapp:0.0.1
n.b. without the --file directive - see what happens !
-
@scooke Couldn't resist another quick effort:
This time I just followed @nj's instructions in the gihub repositroy and ran simply
cloudron build
. This prompted me for a docker repository, so I entered mine along with the suggested image name, com.odoo.cloudronapp, and then this was followed by a message stating:Building locally as docker.toutdo.com/com.odoo.cloudronapp:bunchofnumbersandletters
and the build commenced. (Oh oh, I left out a username thinking thatregistry/username/com.odoo.cloudronapp
meant registry OR username. Will this be a problem?)Thus far it seems like using dr.cloudron.dev was the wrong thing for me to use... but it wasn't clear why!
Well, this also fails in the end. The error message says it can't find the manifest,
App installation error: Installation failed: Unable to pull image docker.toutdo.com/com.odoo.cloudronapp. message: (HTTP code 404) unexpected - manifest for docker.toutdo.com/com.odoo.cloudronapp:latest not found: manifest unknown: manifest unknown statusCode: 404
The build asked for a docker repository, I gave it mine, it built, and then at the end was automatically pushed to my repository. I can see it in the web GUI.
I did run the install command without the tag on the image, so I am trying it again with the tag.
SUCCESS> I guess it needed the tag to install properly.
OK, I really do need to stop and get to work, just want you all to know I did seemingly successfully clone, build, push and install the Odoo app kindly prepped by @nj... thank you! And thank you to @timconsidine and @BrutalBirdie for helping me out too.
My last questions are: What do I do with the original clone and build directory? Leave it? Delete it? How will I update the image later if not by doing it all over again??
Ultimately, it seems to me that the whole point of the Registry is mostly to have a place to keep built Docker images. That's it. I guess that's helpful.
-
@scooke said in How do I do this??:
Thus far it seems like using dr.cloudron.dev was the wrong thing for me to use... but it wasn't clear why!
Of course
dr.cloudron.dev
is not wrong for YOU because its MY server it was an example, you need to replacedr.cloudron.dev
with your docker registry app URL.