Skip to content
This repository has been archived by the owner on Nov 30, 2023. It is now read-only.

Provide Fedora based devcontainer #1292

Open
mwisnicki opened this issue Feb 5, 2022 · 11 comments
Open

Provide Fedora based devcontainer #1292

mwisnicki opened this issue Feb 5, 2022 · 11 comments
Labels
base-container feature-request Request for new features or functionality

Comments

@mwisnicki
Copy link

Please provide alternative devcontainer based on Fedora. Sometimes developing on Ubuntu is not an option.

Relates to: <Codespaces | Remote - Containers | Both>

@eitsupi
Copy link
Contributor

eitsupi commented Feb 6, 2022

I think you may build it yourself by using common-redhat.sh.
https://github.com/microsoft/vscode-dev-containers/blob/main/script-library/docs/common.md

@mwisnicki
Copy link
Author

Thanks for pointing me to that script. I did it by hand without knowing about it. Would be nice if this was more documented and official image would be even better.

@Chuxel
Copy link
Member

Chuxel commented Feb 8, 2022

Given the nuances involved, we've optimized for the debian/ubuntu distro tree for our pre-built images and samples. We do not currently have plans to expand outside of this, but it would be interesting to hear about the scenarios you are thinking about where developing on Debian/Ubuntu is not an option. Do you have an example?

To be clear, the extension itself is not limited to only these distributions at all, however, and we are looking into how we can enable the community more easily share definitions and features like those in this repository (as mentioned in #1291). We want to make it easier for everyone to collaborate than is possible with this repository alone - partly because there's little doubt that different communities have different preferences on Linux distributions.

@Chuxel Chuxel added the info-needed Issue requires more information from poster label Feb 8, 2022
@mwisnicki
Copy link
Author

I had to work on a project that only provided instructions how to setup Fedora/RH development environment and some of the dev dependencies were not even packaged in Debian/Ubuntu. Sticking with Fedora in this case was massively easier than trying to figure out how to build all the missing stuff.

@mwisnicki
Copy link
Author

And this is exactly the use case I consider to be the strong point of CodeSpaces - it doesn't matter which distro or even platform I personally use (which would be Windows 11🙂) because I can quickly get any environment tailored to specific needs of the project at hand.

@Chuxel
Copy link
Member

Chuxel commented Feb 8, 2022

@mwisnicki Yep agreed. You can encapsulate those setup instructions in a Dockerfile like you are saying. Given those instructions existed, was it the common script that you were looking for?

@mwisnicki
Copy link
Author

I looked for any kind of instructions. It wasn't even clear from documentation whether you can use any non-codespaces aware base image (turns out you can just base it on fedora:latest and things just work even without common script).

I used google(github codespaces fedora) and google(github codespaces base image) and didn't find anything on the first pages of results. Now it's finding this ticket so should be easier :)

I think it would be useful to update https://docs.github.com/en/codespaces/setting-up-your-project-for-codespaces/configuring-codespaces-for-your-project#dockerfile to mention you can use any base image, not necessarily from mcr.microsoft.com/vscode/devcontainers/*.

I'm sure one could follow all the links in documentation and find this information somewhere after reading dozens of pages of text but there's just way too much of it.

Of course ideal experience is not having to reach out to documentation/google at all and just have it offered by codespaces UI before creating environment, like you offer Alpine.

@Chuxel Chuxel added base-container feature-request Request for new features or functionality and removed info-needed Issue requires more information from poster labels Feb 8, 2022
@Chuxel
Copy link
Member

Chuxel commented Feb 8, 2022

@bamurtaugh (and @2percentsilk @nikmd23 for related Codespaces docs) This is good feedback re docs 👆

We definitely don't want to leave the impression that you have to use our images - they're there as a convenience for when you don't have one already you want to build up from.

That said, for a base image, makes sense. Flipping to a feature request for that bit.

@bamurtaugh
Copy link
Member

bamurtaugh commented Feb 16, 2022

This is great feedback, thanks @mwisnicki!

Reviewing docs on the VS Code side, it looks like we mention You can use any image, Dockerfile, or set of Docker Compose files as a starting point. Here is a simple example that uses one of the pre-built [VS Code Development Container images](https://hub.docker.com/_/microsoft-vscode-devcontainers):, which seems to help with this feedback (please let me know if it could be clearer!).

@2percentsilk maybe in the Codespaces doc, we could add something similar? i.e. amend the text to:

You can add a Dockerfile to your project to define a container image and install software. In the Dockerfile, you can use FROM to specify the container image, which may be hosted in any registry.

@mwisnicki
Copy link
Author

mwisnicki commented Feb 17, 2022

Yes that's pretty useful but does not come up when google search terms include "github" :(
I'm pretty spoiled by usually finding answer to my questions within first few results and often with excerpt highlighted by google :)

@froazin
Copy link

froazin commented Jul 28, 2023

+1 would be very helpful for working on projects targeting rhel, just for the sake of having easy access to tools like rpmbuild. Currently my work around is to the docker in docker template, then use a Makefile and Dockerfile to pull a fedora image and build the project in there - Not the end of the world, but certainly a quality of life improvement to work natively within the RedHat echo system in cases like this

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
base-container feature-request Request for new features or functionality
Projects
None yet
Development

No branches or pull requests

5 participants