You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When trying to use official ConanDockerTools images with the new feature Docker runners, I wanted to use a custom container name (e.g conan_linux_gcc11), however, the current behavior uses image name instead and ignores my configuration file.
conan create all --version=1.0.1 -pr linux-gcc11
======== Exporting recipe to the cache ========
paho-mqtt-cpp/1.0.1: Exporting package recipe: /Users/uilian/Development/conan/conan-center-index/recipes/paho-mqtt-cpp/all/conanfile.py
paho-mqtt-cpp/1.0.1: exports: File 'conandata.yml' found. Exporting it...
paho-mqtt-cpp/1.0.1: Calling export_sources()
paho-mqtt-cpp/1.0.1: Copied 1 '.py' file: conanfile.py
paho-mqtt-cpp/1.0.1: Copied 1 '.yml' file: conandata.yml
paho-mqtt-cpp/1.0.1: Copied 1 '.patch' file: 1.0.1-0001-fix-cmake.patch
paho-mqtt-cpp/1.0.1: Exported to cache folder: /Users/uilian/.conan2/p/paho-c2a77d934f3de/e
paho-mqtt-cpp/1.0.1: Exported: paho-mqtt-cpp/1.0.1#f7c87fa70a8dc4d8274efeb500f73320 (2024-05-10 10:03:04 UTC)
======== Input profiles ========
Profile host:
[settings]
arch=x86_64
build_type=Release
compiler=gcc
compiler.cppstd=17
compiler.libcxx=libstdc++11
compiler.version=11
os=Linux
[conf]
Profile build:
[settings]
arch=armv8
build_type=Release
compiler=apple-clang
compiler.cppstd=17
compiler.libcxx=libc++
compiler.version=15
os=Macos
[conf]
┌───────────────────────────────┐
| Creating the docker container |
└───────────────────────────────┘
ERROR: Imposible to run the container "conanio/gcc11-ubuntu16.04:2.3.0" with image "conanio/gcc11-ubuntu16.04:2.3.0"
400 Client Error for http+docker://localhost/v1.43/containers/create?name=conanio%2Fgcc11-ubuntu16.04%3A2.3.0: Bad Request ("Invalid container name (conanio/gcc11-ubuntu16.04:2.3.0), only [a-zA-Z0-9][a-zA-Z0-9_.-] are allowed")
The 🐛 is because the code is passing the image name instead of the container name to Docker:
Describe the bug
When trying to use official ConanDockerTools images with the new feature Docker runners, I wanted to use a custom container name (e.g conan_linux_gcc11), however, the current behavior uses image name instead and ignores my configuration file.
The 🐛 is because the code is passing the image name instead of the container name to Docker:
https://github.com/conan-io/conan/blob/2.3.0/conan/internal/runner/docker.py#L114
🍔
/cc @davidsanfal
Environment
OS: OSX 14.4.1 (23E224)
Arch: Mac M1 MAX
Conan version: 2.3.0
Docker version: 25.0.4-rd
Rancher version: 1.13.1
How to reproduce it
To reproduce this error in Mac, I need a profile file and a configuration file, plus, the docker image downloaded.
Once you have these files in your Conan cache folder, you will need to run:
(I ran docker pull separated only to illustrate)
The text was updated successfully, but these errors were encountered: