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

New Docker images: DRY #267

Closed
wants to merge 74 commits into from

Conversation

uilianries
Copy link
Member

@uilianries uilianries commented Jun 7, 2021

Hello all!

This PR brings a new age for CDT, we no longer will bring new docker recipes for each new compiler release. The README file explains more, but in summary:

  • We will keep old Docker recipes and images for a not short period, we understand there are companies and users using them and switch Docker images could be a problem when rebuilding all packages again.
  • Those new images will be used as Official, which means, Conan Center will consume them instead the old ones.
  • We will to migrate from old to new images, it may take weeks, so don't worry, it won't break you now.
  • All new images are based on Ubuntu Xenial (16.04), which is supported until 2024. After that, we can update to 18.04.
  • Packages which require GCC 4.9 or older (Ubuntu Trusty) will need to be rebuilt, because glibc version is newer in Xenial.
  • We are using the exactly same libstdc++ version for all images, libstdc++.so.6.0.29 which is provided by GCC 11.
  • All compilers are built from sources, which give us more compatibility over same environment.
  • We had real problems building Clang 9 and older, so we didn't included them. As Clang is retro-compatible, and GCC is still the main compiler used, we believe the last 3 Clang releases are enough.
  • All old recipes, scripts and tests were moved to legacy folder, so worry, I didn't change nothing there.
  • Special thanks to @SSE4 for helping!

closes #205

/cc @Croydon

  • Refer to the issue that supports this Pull Request.
  • If the issue has missing info, explain the purpose/use case/pain/need that covers this Pull Request.
  • I've read the Contributing guide.
  • I've followed the PEP8 style guides for Python code.
  • I've followed the Best Practices guides for Dockerfile.

uilianries added 30 commits May 31, 2021 08:34
Signed-off-by: Uilian Ries <uilianries@gmail.com>
Signed-off-by: Uilian Ries <uilianries@gmail.com>
Signed-off-by: Uilian Ries <uilianries@gmail.com>
Signed-off-by: Uilian Ries <uilianries@gmail.com>
Signed-off-by: Uilian Ries <uilianries@gmail.com>
Signed-off-by: Uilian Ries <uilianries@gmail.com>
Signed-off-by: Uilian Ries <uilianries@gmail.com>
Signed-off-by: Uilian Ries <uilianries@gmail.com>
Signed-off-by: Uilian Ries <uilianries@gmail.com>
Signed-off-by: Uilian Ries <uilianries@gmail.com>
Signed-off-by: Uilian Ries <uilianries@gmail.com>
Signed-off-by: Uilian Ries <uilianries@gmail.com>
Signed-off-by: Uilian Ries <uilianries@gmail.com>
Signed-off-by: Uilian Ries <uilianries@gmail.com>
Signed-off-by: Uilian Ries <uilianries@gmail.com>
Signed-off-by: Uilian Ries <uilianries@gmail.com>
Signed-off-by: Uilian Ries <uilianries@gmail.com>
Signed-off-by: Uilian Ries <uilianries@gmail.com>
Signed-off-by: Uilian Ries <uilianries@gmail.com>
Signed-off-by: Uilian Ries <uilianries@gmail.com>
Signed-off-by: Uilian Ries <uilianries@gmail.com>
Signed-off-by: Uilian Ries <uilianries@gmail.com>
Signed-off-by: Uilian Ries <uilianries@gmail.com>
Signed-off-by: Uilian Ries <uilianries@gmail.com>
Signed-off-by: Uilian Ries <uilianries@gmail.com>
Signed-off-by: Uilian Ries <uilianries@gmail.com>
Signed-off-by: Uilian Ries <uilianries@gmail.com>
Signed-off-by: Uilian Ries <uilianries@gmail.com>
Signed-off-by: Uilian Ries <uilianries@gmail.com>
Signed-off-by: Uilian Ries <uilianries@gmail.com>
uilianries and others added 8 commits June 10, 2021 07:59
Signed-off-by: Uilian Ries <uilianries@gmail.com>
Signed-off-by: Uilian Ries <uilianries@gmail.com>
Signed-off-by: Uilian Ries <uilianries@gmail.com>
Signed-off-by: Uilian Ries <uilianries@gmail.com>
azure-pipelines.yml Outdated Show resolved Hide resolved
modern/base/Dockerfile Outdated Show resolved Hide resolved
modern/base/Dockerfile Outdated Show resolved Hide resolved
modern/base/Dockerfile Outdated Show resolved Hide resolved
modern/server/Dockerfile Outdated Show resolved Hide resolved
Signed-off-by: Uilian Ries <uilianries@gmail.com>
Signed-off-by: Uilian Ries <uilianries@gmail.com>
Signed-off-by: Uilian Ries <uilianries@gmail.com>
Signed-off-by: Uilian Ries <uilianries@gmail.com>
@jgsogo
Copy link
Contributor

jgsogo commented Jun 15, 2021

RFC:

  • I think the base image should have Conan installed, and use the Conan version as a tag (it is consistent with the rest of the images). No need for those -conan images and there is no very little extra time when releasing images with new Conan, the -deploy image is just copying things, it doesn't need to build anything again.

  • By default preconfigure Conan client and update default profile with the new compiler.libcxx configuration:

    conan profile update settings.compiler.libcxx=libstdc++11 default

@uilianries
Copy link
Member Author

I think the base image should have Conan installed, and use the Conan version as a tag (it is consistent with the rest of the images). No need for those -conan images and there is no very little extra time when releasing images with new Conan, the -deploy image is just copying things, it doesn't need to build anything again.

What is your suggestion about new Conan releases, build base and deploy again for each new release?
Remember that if we need to update anything in base right now, we would need re-execute all steps again.
Of course, we can separate RUN pip install conan... in base, it would increase a little bit the image size, but the trade off is still valid, because we are doing it on top layer (conan). I like your idea, at least, we would have all centralized.

By default preconfigure Conan client and update default profile with the new compiler.libcxx configuration

I would prefer keeping the old format for compatibility reason. People still can use our Docker images as build environment, but won't be the same default behavior as when installing locally. Example, you build a package in your local machine, then you try to consume it in your docker image, the libcxx is not same, so Conan complains about and you have to decide between building all again or updating the default profile.

@jgsogo
Copy link
Contributor

jgsogo commented Jun 16, 2021

By default preconfigure Conan client and update default profile with the new compiler.libcxx configuration

I would prefer keeping the old format for compatibility reason. People still can use our Docker images as build environment, but won't be the same default behavior as when installing locally. Example, you build a package in your local machine, then you try to consume it in your docker image, the libcxx is not same, so Conan complains about and you have to decide between building all again or updating the default profile.

Agree with you on the defaults and compatibility reasons... but with Conan v2 in mind, libstdc++11 will be the default. It is also the default for new compiler. This cannot be considered as breaking because these are new images with different names, we need to think about them on the long-term, not constraint to current images or technical debt.

@uilianries
Copy link
Member Author

uilianries commented Jun 16, 2021

Closing this PR in favor of #271

The new PR is the SAME, but uses CDT as repository, so any new PR will be tested on Azure.

@uilianries uilianries closed this Jun 16, 2021
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.

Use base docker image for multiple compiler versions
4 participants