How to access private conan repository when using docker?
See original GitHub issueDescription of Problem, Request, or Question
I’m trying to build a package A which depeds on package B in our private conan repository.
Everything is fine if not using docker, but build with use_docker=True
will end with:
conans.errors.NotFoundException: Unable to find 'package B' in remotes
I have figured out that’s because out private repository needed login and the remote in docker container seems remain ‘anonymous’:
# Output of `self.run("conan user") in conanfile.py
Current user of remote 'private-repo' set to: 'None' (anonymous)
So what is the prefered way to login to private remote when using docker?
I’ve tried:
- using
docker_entry_script
: not work since remotes is not added to conan yet - call
ConanMultiPackager.login
: no effects in docker - call
conan user -r ...
in theconanfile.py
: worked but I doubt it’s the good way to go
Environment Details
- Conan Package Tools Version: 0.29.3
- Operating System: macOS
- Operation System Version: 10.14.6
- Compiler+version: clang7
- Docker image: conanio/clang7
- Conan version: conan 1.19.2
- Python version: python 3.7.4
Steps to reproduce
Contents of build.py
:
...
docker_builder = ConanMultiPackager(
username="local",
login_username="XXX",
password="********",
remotes="our-private-repo-url",
...
use_docker=True,
docker_image="conanio/clang7"
)
# docker_builder.login("myrepo")
docker_builder.add_common_builds()
docker_builder.run()
Issue Analytics
- State:
- Created 4 years ago
- Comments:13 (7 by maintainers)
Top Results From Across the Web
Provided Conan Docker Image out of date - Stack Overflow
I've already attempted to manually install Python3 in the yaml file but that led to more issues. Ultimately I want to be able...
Read more >Running conan_server — conan 1.56.0 documentation
First, clone the Conan repository from source and install the requirements: ... Example: Use conan_server in a Docker container that internally runs in...
Read more >Docker Registry - JFrog - JFrog Documentation
Overview. Set up a secure private Docker registry in minutes to manage all your Docker images while exercising fine-grained access control.
Read more >Conan packages in the Package Registry - GitLab Docs
Publish Conan packages in your project's Package Registry. Then install the packages whenever you need to use them as a dependency.
Read more >Accessing Repositories - Docker Registry - Sonatype Help
You can browse Docker repositories in the user interface and inspect the components and assets and their details as documented in Browsing Repositories...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@Parcley Indeed, I’ll revisit this issue during this week. Thanks for pinging.
@Parcley I’ll take a look on it. Have a great weekend!