Skip to content

Conversation

@rom1v
Copy link
Collaborator

@rom1v rom1v commented Oct 19, 2025

Here is a draft Dockerfile to create an environment to build scrcpy.

You should use podman (rootless), but you can also use docker.

# Build the image
cd container
podman build -t scrcpy-builder .

Then you can instantiate (remove --rm if you plan to keep your changes):

podman run -it --rm scrcpy-builder bash

From the container:

git clone https://github.com/Genymobile/scrcpy -b dev
cd scrcpy
meson setup x
meson compile -Cx

The most difficult part was to make gradle pre-download the dependencies in the image (so that it's not performed for each container instance).

Alternatively, you can run with your host scrcpy folder mounted:

podman run \
  -v PATH_TO_SCRCPY:/home/debian/scrcpy \
  --userns=keep-id \
  -it scrcpy-builder \
  bash

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants