Error using docker to build the windows client

Hi all,

Using the latest documentation but still getting errors. Could anyone help me fix this so I could then assist in updating (clarifying) the documentation?

Hi,

i think it might help if you post the errors you're getting :slight_smile:

Ok, so after correcting a spelling error (yup, Immaidiot), I now get:

su: warning: cannot change directory to /home/user: No such file or directory
-bash: line 1: cd: /home/user/client/: No such file or directory
mkdir: cannot create directory 'build-win32': Permission denied
-bash: line 4: cd: build-win32: No such file or directory
-bash: line 5: ../admin/win/download_runtimes.sh: No such file or directory
CMake Error: The source directory "/" does not appear to contain CMakeLists.txt.
Specify --help for usage, or press the help button on the CMake GUI.
make: *** No targets specified and no makefile found. Stop.
make: *** No rule to make target 'package'. Stop.
Test project /
Cannot create directory //Testing/Temporary
Cannot create log file: LastTest.log

Should I be editing the build.sh file or some other such configuration?

All help hugely appreciated.

I just want to help improve the documentation

1 Like

Hi @eointiereney! Thanks for the insterest in the development of owncloud and its documentation :wink:

I might be able to help you with this, since I was messing around with this image just some days ago and it's kind of tricky since there's actually not many docs about this.

From your messages I'm assuming you are using @DeepDiver1975's docker-owncloud-client-win32 image, and you already have a container up and running (named e.g. docker-owncloud-client-win32) .

From the host machine:

  1. Clone and copy the contents of the client repository and the git submodules into the container.
  2. Then copy this contents to the running container.

$ git clone --depth 1 git@github.com:owncloud/client.git
Cloning into 'client'...
...
Resolving deltas: 100% (189/189), done.
# You need to initialize and clone all the relevant submodules:
$ cd client 
$ git submodule update --init 
...
$ docker cp ./ docker-owncloud-client-win32:client

From the docker container:

Note: you can run these with docker exec -ti from the host machine:

  1. You need the compile_client.sh script, from the owncloud/administration repository.
  2. Then you just need to specify the path to the repository as argument for the script.

# wget https://raw.githubusercontent.com/owncloud/administration/master/jenkins/win32_build/compile_client.sh
...
# ./compile_client.sh client
...
CPack: Create package
CPack: - package: /client/build/ownCloud-2.3.0.0git-setup.exe generated.

Finally, you can copy back to the host machine the .exe created in the container:

$ docker cp docker-owncloud-client-win32:client/build/ownCloud-2.3.0.0git-setup.exe ~/Desktop/

Hope this helps! :grin:

2 Likes

Ah you're a superstar! I'll get stuck into this after dinner.

Gotta love the community spirit :slight_smile:

I have tried these instructions, but when i run ./compile_client.sh client from inside the container it says permission denied?

Do you do that with sudo/ as root?

duh, sorry yes that works now! :smiley: thanks...

but now i seem to get this error?

Run CPack packaging tool...
CPack: Create package using NSIS
CPack: Install projects
CPack: - Run preinstall target for: client
CPack: - Install project: client
CPack: Create package
CPack Error: Problem running NSIS command: "/usr/bin/makensis" "/client/build/_CPack_Packages/unused/NSIS/project.nsi"
Please check /client/build/_CPack_Packages/unused/NSIS/NSISOutput.log for errors
CPack Error: Problem compressing the directory
CPack Error: Error when generating package: ownCloud
Makefile:61: recipe for target 'package' failed
make: *** [package] Error 1
/client

that NSISOutput.log gives this:
Error in script "/client/build/_CPack_Packages/unused/NSIS/project.nsi" on line 436 -- aborting creation process

Have you figured this out yet? I'm at the exact same place you are. I've got my docker image running and when I run ./compile_client.sh client I get the exact same message you do when trying to build:

CPack Error: Problem running NSIS command: "/usr/bin/makensis" "/client/build/_CPack_Packages/unused/NSIS/project.nsi"
Please check /client/build/_CPack_Packages/unused/NSIS/NSISOutput.log for errors

I followed your instructions exactly. I used the same docker image and can get to the step where I run: ./compile_client.sh client

But when I do this I get:

CPack Error: Problem running NSIS command: "/usr/bin/makensis" "/client/build/_CPack_Packages/unused/NSIS/project.nsi"
Please check /client/build/_CPack_Packages/unused/NSIS/NSISOutput.log for errors
CPack Error: Problem compressing the directory
CPack Error: Error when generating package: ownCloud

Any ideas?

It successfully built for me after that.

@grapestack @travisreynolds note that for v2.3 of the client we switched to a new image: https://hub.docker.com/r/guruz/docker-owncloud-client-win32/

Check if the new one goes smooth for you guys :slight_smile:

1 Like

Built successfully! Thank you :slight_smile:

1 Like