microsoft / microsoft/vscode-remote-release
Container features: Non-Debian distros
@chrmarti is already working on this.
Since Jul 4, 2022.
- Dominant language
- Dockerfile
- Stars
- 4.2k
- Forks
- 470
- Avg merge
- 1d 1h
- Merged PRs (30d)
- 1
Description
My company's base container is based off Amazon Linux 2. The Dockerfile starts with FROM amazonlinux:2. This is roughly CentOS 7, so it's Red Hat based and uses yum instead of apt. Dnf is not available. To reduce friction, I want our devs to be able to use .devcontainer so they can test and debug their code in an environment similar to the runtime environment.
Currently, when I set up .devcontainer/Dockerfile to use this, it fails as follows. I've extracted the most relevant looking section. Apologies for the horizontal wrap/cutoff, that's what the file really contains.
=> CACHED [stage-1 1/2] COPY --from=dev_containers_feature_content_sourc 0.0s
=> [stage-1 2/2] RUN cd /tmp/build-features/local-cache && chmod +x ./in 0.4s
[2022-07-01T16:17:17.263Z]
=> ERROR [stage-1 2/2] RUN cd /tmp/build-features/local-cache && chmod + 0.4s
------
> [stage-1 2/2] RUN cd /tmp/build-features/local-cache && chmod +x ./install.sh
&& ./install.sh:
#0 0.390
#0 0.390 *********** Unsupported operating system "amzn" detected ***********
#0 0.390
#0 0.390 Features support currently requires a Debian/Ubuntu-based image. Update
your
#0 0.390 image or Dockerfile FROM statement to start with a supported OS. For ex
ample:
#0 0.390 mcr.microsoft.com/vscode/devcontainers/base:ubuntu
#0 0.390
#0 0.390 Aborting build...
#0 0.390
The most relevant looking portion is:
Features support currently requires a Debian/Ubuntu-based image.
I don't mind rigging up the pieces here, I just want my team to have the ability to debug inside a standard container so we can get out of "works on my machine/doesn't work in CI" territory.
One solution would be to have an official way to use this distro. Another solution would be to provide an override for install.sh so I can rewrite it as it may pertain to my specific container. It's fine if that's unsupported with a big scary warning.
In short, my feature request is the option to use amazonlinux:2 for a base image even if I have to do extra work.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Assessment
This issue has not been assessed yet.