moonlight-nx icon indicating copy to clipboard operation
moonlight-nx copied to clipboard

docker build error

Open windraver opened this issue 3 years ago • 4 comments

Docker build fails image

possibly due to running docker on a Windows 10 PC.

windraver avatar Jan 21 '21 04:01 windraver

looks like dkp-pacman is meant for linux. I'm looking for a windows equivalent.

windraver avatar Jan 21 '21 06:01 windraver

now I understand that docker is a virtual environment. so it seems we're virtually running debian.

the issue here is the install of devkitpro fails. So to finish the dockerfile, I removed it: image

instructions then would be as follows:

  1. Build a development environment: docker build . -t moonlight-nx-build
  2. Run run the development environment: docker run -it moonlight-nx-build
  3. Clone this repo: git clone --recursive https://github.com/rock88/moonlight-nx.git
  4. get the devkitpro now that the docker container is running: dkp-pacman -S --noconfirm devkitpro-pkgbuild-helpers
  5. Set environment variables for the custom libcurl build: export LIBCURL_PKGBUILD_URL="https://github.com/devkitPro/pacman-packages/raw/1582ad85914b14497fae32a9fe9074c0374f99f7/switch/curl/PKGBUILD"; export LIBCURL_BUILD_USER="build"
  6. Run the build: cd moonlight-nx; ./build.sh; exit.
  7. Get the docker container id: docker ps -l
  8. Copy the .nro out of the container: docker cp PutYourContainerIdHere:moonlight-nx/moonlight.nro .

I couldn't get the file out from the container until I used the container ID. image

windraver avatar Jan 21 '21 09:01 windraver

Thanks for advice, I did update README :)

rock88 avatar Feb 07 '21 13:02 rock88

devkitpro is a bit of a troublemaker because they really don't want people using dkp-pacman from scripts or any kind of automation - I dimly remember having to implement some cheeky workarounds to get installing it to work from GitHub actions, for example.

I couldn't get the file out from the container until I used the container ID.

You should also be able to use the container name, which in your case there was kind_kare. Running the build process as docker run --name moonlight-nx-build -it moonlight-nx-build should make it possible to use docker cp moonlight-nx-build:moonlight-nx/moonlight.nro . to get the nro out of the container with out needing to get the container ID.

fpiesche avatar Feb 12 '21 19:02 fpiesche