question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

How to access private conan repository when using docker?

See original GitHub issue

Description 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 the conanfile.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:open
  • Created 4 years ago
  • Comments:13 (7 by maintainers)

github_iconTop GitHub Comments

1reaction
uilianriescommented, Oct 5, 2021

@Parcley Indeed, I’ll revisit this issue during this week. Thanks for pinging.

0reactions
uilianriescommented, Nov 5, 2021

@Parcley I’ll take a look on it. Have a great weekend!

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found