Skip to content

Fixes docker check in isaaclab.sh script in systems where docker is not installed - #4180

Merged
kellyguo11 merged 3 commits into
isaac-sim:mainfrom
klakhi:klakhi/docker_check_fix
Dec 11, 2025
Merged

kellyguo11 merged 3 commits into
isaac-sim:mainfrom
klakhi:klakhi/docker_check_fix

Conversation

@klakhi

@klakhi klakhi commented Dec 10, 2025 •

Copy link
Copy Markdown
Contributor

Description

the is_docker() check can sometimes detect that we are installing in docker even though docker is not available on the system, causing to downstream issues in the script. this fix narrows the checks for docker to avoid false positives.

Fixes #4181

Type of change

  • Bug fix (non-breaking change which fixes an issue)

Checklist

  • I have read and understood the contribution guidelines
  • I have run the pre-commit checks with ./isaaclab.sh --format
  • I have made corresponding changes to the documentation
  • My changes generate no new warnings
  • I have added tests that prove my fix is effective or that my feature works
  • I have updated the changelog and the corresponding version in the extension's config/extension.toml file
  • I have added my name to the CONTRIBUTORS.md or my name already exists there

@greptile-apps

greptile-apps Bot commented Dec 10, 2025

Copy link
Copy Markdown
Contributor

Greptile Overview

Greptile Summary

Improved the is_docker() function to better detect container environments including Podman, Kubernetes pods, and other container runtimes.

  • Added /run/.containerenv check for Podman container detection
  • Enhanced /proc/1/cgroup check with extended regex pattern to detect docker, containerd, kubepods, and podman
  • Removed unreliable checks: /proc/mounts grep and hostname pattern matching
  • Simplified logic while maintaining backward compatibility with existing Docker detection

Confidence Score: 4/5

  • This PR is safe to merge with low risk
  • The changes improve container detection reliability by adding Podman support and removing less reliable checks. The function is only used to skip VSCode setup in containers, so false positives/negatives have minimal impact. The logic is well-tested in production container environments.
  • No files require special attention

Important Files Changed

File Analysis

Filename Score Overview
isaaclab.sh 4/5 Improved Docker/container detection logic by adding Podman support and refining checks

Sequence Diagram

sequenceDiagram
    participant Script as isaaclab.sh
    participant FS as Filesystem
    participant Proc as /proc
    participant Comm as /proc/1/comm
    
    Script->>Script: is_docker() called
    Script->>FS: Check /.dockerenv exists
    alt /.dockerenv exists
        FS-->>Script: File found (Docker)
        Script-->>Script: Return true
    else /.dockerenv not found
        Script->>FS: Check /run/.containerenv exists
        alt /run/.containerenv exists
            FS-->>Script: File found (Podman)
            Script-->>Script: Return true
        else /run/.containerenv not found
            Script->>Proc: grep -qaE '(docker|containerd|kubepods|podman)' /proc/1/cgroup
            alt Pattern matches
                Proc-->>Script: Match found (Container)
                Script-->>Script: Return true
            else Pattern not found
                Script->>Comm: cat /proc/1/comm
                Comm-->>Script: Read process name
                alt Process is containerd-shim
                    Script-->>Script: Return true
                else Not containerd-shim
                    Script-->>Script: Return false (Not in container)
                end
            end
        end
    end
    Script->>Script: Use result to skip VSCode setup if in container
Loading

@greptile-apps greptile-apps Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

1 file reviewed, no comments

Edit Code Review Agent Settings | Greptile

@kellyguo11

Copy link
Copy Markdown
Contributor

@nv-apoddubny could you help give this change a review?

@nv-apoddubny nv-apoddubny left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Removes /proc/mounts check. This could miss some edge cases where Docker volumes are mounted but cgroups don't show container info. The rest is looking good.

@kellyguo11 kellyguo11 changed the title Docker check fix Fixes docker check in isaaclab.sh script in systems where docker is not installed Dec 11, 2025
@kellyguo11
kellyguo11 merged commit 69b30bf into isaac-sim:main Dec 11, 2025
9 of 10 checks passed
kellyguo11 pushed a commit that referenced this pull request Dec 11, 2025
…ot installed (#4180)

# Description

the is_docker() check can sometimes detect that we are installing in
docker even though docker is not available on the system, causing to
downstream issues in the script. this fix narrows the checks for docker
to avoid false positives.

Fixes #4181 


## Type of change

<!-- As you go through the list, delete the ones that are not
applicable. -->

- Bug fix (non-breaking change which fixes an issue)

## Checklist

- [x] I have read and understood the [contribution
guidelines](https://isaac-sim.github.io/IsaacLab/main/source/refs/contributing.html)
- [ ] I have run the [`pre-commit` checks](https://pre-commit.com/) with
`./isaaclab.sh --format`
- [ ] I have made corresponding changes to the documentation
- [x] My changes generate no new warnings
- [ ] I have added tests that prove my fix is effective or that my
feature works
- [ ] I have updated the changelog and the corresponding version in the
extension's `config/extension.toml` file
- [x] I have added my name to the `CONTRIBUTORS.md` or my name already
exists there

<!--
As you go through the checklist above, you can mark something as done by
putting an x character in it

For example,
- [x] I have done this task
- [ ] I have not done this task
-->
T-K-233 pushed a commit to ucb-bar/IsaacLab that referenced this pull request Dec 29, 2025
…ot installed (isaac-sim#4180)

# Description

the is_docker() check can sometimes detect that we are installing in
docker even though docker is not available on the system, causing to
downstream issues in the script. this fix narrows the checks for docker
to avoid false positives.

Fixes isaac-sim#4181 


## Type of change

<!-- As you go through the list, delete the ones that are not
applicable. -->

- Bug fix (non-breaking change which fixes an issue)

## Checklist

- [x] I have read and understood the [contribution
guidelines](https://isaac-sim.github.io/IsaacLab/main/source/refs/contributing.html)
- [ ] I have run the [`pre-commit` checks](https://pre-commit.com/) with
`./isaaclab.sh --format`
- [ ] I have made corresponding changes to the documentation
- [x] My changes generate no new warnings
- [ ] I have added tests that prove my fix is effective or that my
feature works
- [ ] I have updated the changelog and the corresponding version in the
extension's `config/extension.toml` file
- [x] I have added my name to the `CONTRIBUTORS.md` or my name already
exists there

<!--
As you go through the checklist above, you can mark something as done by
putting an x character in it

For example,
- [x] I have done this task
- [ ] I have not done this task
-->
Edify0991 pushed a commit to Edify0991/IsaacLab that referenced this pull request Jan 14, 2026
…ot installed (isaac-sim#4180)

# Description

the is_docker() check can sometimes detect that we are installing in
docker even though docker is not available on the system, causing to
downstream issues in the script. this fix narrows the checks for docker
to avoid false positives.

Fixes isaac-sim#4181 


## Type of change

<!-- As you go through the list, delete the ones that are not
applicable. -->

- Bug fix (non-breaking change which fixes an issue)

## Checklist

- [x] I have read and understood the [contribution
guidelines](https://isaac-sim.github.io/IsaacLab/main/source/refs/contributing.html)
- [ ] I have run the [`pre-commit` checks](https://pre-commit.com/) with
`./isaaclab.sh --format`
- [ ] I have made corresponding changes to the documentation
- [x] My changes generate no new warnings
- [ ] I have added tests that prove my fix is effective or that my
feature works
- [ ] I have updated the changelog and the corresponding version in the
extension's `config/extension.toml` file
- [x] I have added my name to the `CONTRIBUTORS.md` or my name already
exists there

<!--
As you go through the checklist above, you can mark something as done by
putting an x character in it

For example,
- [x] I have done this task
- [ ] I have not done this task
-->
nitesh-subedi pushed a commit to nitesh-subedi/IsaacLab that referenced this pull request Feb 5, 2026
…ot installed (isaac-sim#4180)

# Description

the is_docker() check can sometimes detect that we are installing in
docker even though docker is not available on the system, causing to
downstream issues in the script. this fix narrows the checks for docker
to avoid false positives.

Fixes isaac-sim#4181 


## Type of change

<!-- As you go through the list, delete the ones that are not
applicable. -->

- Bug fix (non-breaking change which fixes an issue)

## Checklist

- [x] I have read and understood the [contribution
guidelines](https://isaac-sim.github.io/IsaacLab/main/source/refs/contributing.html)
- [ ] I have run the [`pre-commit` checks](https://pre-commit.com/) with
`./isaaclab.sh --format`
- [ ] I have made corresponding changes to the documentation
- [x] My changes generate no new warnings
- [ ] I have added tests that prove my fix is effective or that my
feature works
- [ ] I have updated the changelog and the corresponding version in the
extension's `config/extension.toml` file
- [x] I have added my name to the `CONTRIBUTORS.md` or my name already
exists there

<!--
As you go through the checklist above, you can mark something as done by
putting an x character in it

For example,
- [x] I have done this task
- [ ] I have not done this task
-->
csj-275 pushed a commit to csj-275/IsaacLab that referenced this pull request Jul 8, 2026
…ot installed (isaac-sim#4180)

# Description

the is_docker() check can sometimes detect that we are installing in
docker even though docker is not available on the system, causing to
downstream issues in the script. this fix narrows the checks for docker
to avoid false positives.

Fixes isaac-sim#4181 


## Type of change

<!-- As you go through the list, delete the ones that are not
applicable. -->

- Bug fix (non-breaking change which fixes an issue)

## Checklist

- [x] I have read and understood the [contribution
guidelines](https://isaac-sim.github.io/IsaacLab/main/source/refs/contributing.html)
- [ ] I have run the [`pre-commit` checks](https://pre-commit.com/) with
`./isaaclab.sh --format`
- [ ] I have made corresponding changes to the documentation
- [x] My changes generate no new warnings
- [ ] I have added tests that prove my fix is effective or that my
feature works
- [ ] I have updated the changelog and the corresponding version in the
extension's `config/extension.toml` file
- [x] I have added my name to the `CONTRIBUTORS.md` or my name already
exists there

<!--
As you go through the checklist above, you can mark something as done by
putting an x character in it

For example,
- [x] I have done this task
- [ ] I have not done this task
-->
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working infrastructure

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug Report] isaaclab.sh incorrectly detects if script is run inside docker container or not

3 participants