Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Additional info for running Docker image with private repos #270

Open
rieschl opened this issue Nov 24, 2020 · 4 comments
Open

Additional info for running Docker image with private repos #270

rieschl opened this issue Nov 24, 2020 · 4 comments
Labels
dependencies Pull requests that update a dependency file question

Comments

@rieschl
Copy link

rieschl commented Nov 24, 2020

I use this tool with Docker to check our internal libraries if our devs don't add bc breaks. I run it manually on my local machine for larger PRs, not automatically in GH actions.

So I need to modify the command a little bit and maybe someone in the same situation can benefit from that:

docker run --rm -v ~/.composer/auth.json:/composer/auth.json:ro -v ~/.ssh:/root/.ssh:ro  -v `pwd`:/app nyholm/roave-bc-check

That mounts the auth.json for composer (private Satis) and SSH keys to the container. It didn't work initially and I had to dig into the image to realize that the composer path is not in /root/.composer (which is the default) but in /composer.

Maybe it can be added to the readme to point users with private packages to the right direction?

Thanks!

@Ocramius
Copy link
Member

Maybe it can be added to the readme to point users with private packages to the right direction?

I think this should be documented in the docker image: the tool itself assumes a fully functional app as mounted volume, unless it does some trickery that I'm unaware of?

If it started doing more than that (such as running composer install), it would probably be best to link the image docs, instead of expanding scope here.

@Ocramius Ocramius added dependencies Pull requests that update a dependency file question labels Nov 24, 2020
@rieschl
Copy link
Author

rieschl commented Nov 24, 2020

Right, putting it in the readme of the docker repo is a good idea 🙂
@Nyholm what do you think?

@Ocramius
Copy link
Member

Ah, I just checked something that I missed as an assumption: roave/backward-compatibility-check does indeed perform composer install in a temporary location (by design).

Therefore nothing to do with Dockerfile, but it is true that docker install must be working according to current user credentials, when using private packages.

@Ocramius
Copy link
Member

-v ~/.ssh:/root/.ssh:ro

Probably not something to be put in documentation as an example: using a deployment SSH key is preferable :-)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
dependencies Pull requests that update a dependency file question
Projects
None yet
Development

No branches or pull requests

2 participants