Skip to content

Fix .dockerignore so the _isaac_sim host symlink is not copied into the image#5746

Merged
kellyguo11 merged 1 commit into
isaac-sim:mainfrom
AntoineRichard:antoiner/dockerignore-isaac-sim-symlink
May 25, 2026
Merged

Fix .dockerignore so the _isaac_sim host symlink is not copied into the image#5746
kellyguo11 merged 1 commit into
isaac-sim:mainfrom
AntoineRichard:antoiner/dockerignore-isaac-sim-symlink

Conversation

@AntoineRichard

Copy link
Copy Markdown
Collaborator

Description

⚠️ High priority — this silently breaks the docker image for anyone who has a local _isaac_sim symlink at the repo root (the standard developer setup pointing to a local Isaac Sim build).

.dockerignore has long carried the entry:

# ignore isaac sim symlink
_isaac_sim?

The ? in dockerignore glob syntax means exactly one character, so the pattern only matches names like _isaac_simX and does not match the bare _isaac_sim symlink that contributors create at the repo root.

This was harmless until docker/Dockerfile.base switched to a wholesale COPY --chown=isaaclab:isaaclab ../ ${ISAACLAB_PATH}/ near the end of the image build. That broad copy now sweeps the host _isaac_sim symlink into the image, overwriting the in-image symlink that the earlier RUN ln -sf ${ISAACSIM_ROOT_PATH} ${ISAACLAB_PATH}/_isaac_sim step creates. Inside the container, _isaac_sim ends up pointing at the host path (e.g. ../IsaacSim/_build/linux-x86_64/release), which doesn't exist there — so every isaaclab.sh command that follows the symlink fails.

This PR fixes the pattern to match the actual symlink name.

Fixes # (no tracking issue — discovered while debugging a broken local docker image)

Type of change

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

Screenshots

N/A — one-character .dockerignore change.

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 (N/A — no user-facing docs)
  • My changes generate no new warnings
  • I have added tests that prove my fix is effective or that my feature works (N/A — .dockerignore glob; verified manually)
  • I have updated the changelog and the corresponding version in the extension's config/extension.toml file (N/A — no source/<package>/ touched)
  • I have added my name to the CONTRIBUTORS.md or my name already exists there

The pattern `_isaac_sim?` uses a single-char glob, which only matches
names with exactly one trailing character (e.g. `_isaac_simX`). It does
not match the bare `_isaac_sim` symlink that contributors create at the
repo root pointing to a local Isaac Sim install.

Combined with the broad `COPY ../ ${ISAACLAB_PATH}/` in Dockerfile.base,
the host symlink leaks into the build context and overwrites the
in-image symlink created by `ln -sf ${ISAACSIM_ROOT_PATH}`, leaving a
dangling link inside the container.

Drop the `?` so the pattern matches the symlink itself.
@AntoineRichard AntoineRichard added the bug Something isn't working label May 22, 2026

@isaaclab-review-bot isaaclab-review-bot Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🤖 Isaac Lab Review Bot

Summary

This PR fixes an incorrect glob pattern in .dockerignore that was allowing the _isaac_sim host symlink to leak into Docker builds.

Analysis

Root Cause Identified ✅
The existing pattern _isaac_sim? uses the ? glob metacharacter, which matches exactly one character. This means it would match _isaac_simX, _isaac_sim1, etc., but not the bare _isaac_sim symlink that developers create at the repo root.

Impact Assessment
When combined with the broad COPY ../ ${ISAACLAB_PATH}/ in Dockerfile.base, the host symlink was being copied into the image, overwriting the in-image symlink created by ln -sf ${ISAACSIM_ROOT_PATH} ${ISAACLAB_PATH}/_isaac_sim. This results in a dangling symlink inside the container that breaks isaaclab.sh commands.

Fix Correctness ✅
The change from _isaac_sim? to _isaac_sim is correct:

  • It now matches the exact symlink name _isaac_sim
  • The pattern is anchored (no leading / needed for root-level match in dockerignore)
  • It will properly exclude the symlink from the Docker build context

Potential Considerations

  1. No over-exclusion risk: The pattern _isaac_sim will only match files/directories named exactly _isaac_sim. It will not affect _isaac_sim_xyz or other variants.
  2. If recursive matching was intended: The original ? pattern may have been a typo or miscommunication. If there was ever a need to match _isaac_sim followed by exactly one character, that use case is now dropped (but this seems unintentional given the comment says "ignore isaac sim symlink").
  3. Alternative patterns: If both _isaac_sim AND variants like _isaac_sim1 need to be ignored, a pattern like _isaac_sim* could be used instead. However, based on the PR description and the specific developer workflow, matching just _isaac_sim is the correct fix.

Testing

  • .dockerignore changes do not require unit tests
  • The fix can be verified by building the Docker image with a _isaac_sim symlink at the repo root and confirming it is not included in the build context
  • Pre-commit checks pass ✅

Verdict

This is a straightforward, correct fix for a pattern that never matched its intended target. The change is minimal, well-documented in the PR description, and addresses a real issue that silently breaks Docker builds for contributors with local Isaac Sim symlinks.


Review generated by Isaac Lab Review Bot

@greptile-apps

greptile-apps Bot commented May 22, 2026

Copy link
Copy Markdown
Contributor

Greptile Summary

Fixes a one-character .dockerignore glob bug where _isaac_sim? (matching only names with exactly one trailing character) never matched the bare _isaac_sim symlink that developers create at the repo root. The corrected pattern _isaac_sim prevents the host symlink from being swept into the image by the broad COPY ../ ${ISAACLAB_PATH} step in Dockerfile.base.

  • .dockerignore: _isaac_sim?_isaac_sim — the ? wildcard matches exactly one character, so the old pattern was silently a no-op for the actual symlink name, allowing the host path to leak into the container build context.

Confidence Score: 5/5

Safe to merge — the change is a single-character correction to a .dockerignore glob that was previously ignoring nothing at all for the standard _isaac_sim symlink name.

The fix is minimal, targeted, and correct. The ? glob operator in dockerignore syntax means exactly one character, so the old _isaac_sim? pattern never matched the bare _isaac_sim symlink. Removing the ? restores the intended behavior confirmed by the inline comment. The Dockerfile itself confirms the need to exclude the host symlink from the build context.

No files require special attention — only .dockerignore is changed, and the fix is straightforward.

Important Files Changed

Filename Overview
.dockerignore Removes trailing ? from _isaac_sim? so the bare _isaac_sim symlink is correctly excluded from the Docker build context.

Flowchart

%%{init: {'theme': 'neutral'}}%%
flowchart TD
    A[Docker build triggered] --> B["COPY ../ to ISAACLAB_PATH (line 52)"]
    B --> C{Is _isaac_sim in build context?}
    C -->|"Old: _isaac_sim? never matched bare symlink"| D["Host _isaac_sim symlink copied into image"]
    C -->|"New: _isaac_sim matches exactly"| E[_isaac_sim excluded from build context]
    D --> F["RUN ln -sf ISAACSIM_ROOT_PATH _isaac_sim (line 58)"]
    E --> F
    F --> G["_isaac_sim → correct in-container path ✓"]
Loading

Reviews (1): Last reviewed commit: "Fix dockerignore pattern for _isaac_sim ..." | Re-trigger Greptile

@kellyguo11 kellyguo11 merged commit 54a65ea into isaac-sim:main May 25, 2026
9 of 10 checks passed
kellyguo11 added a commit that referenced this pull request May 28, 2026
# Description

Merge changes from main branch:

- #4875 - Adds Isaac-Stack-Cube-Franka-IK-Rel-v0 task variants
- #4909 - Updates minor RSL-RL configclass docstring
- #4934 - Updates Newton docs on main for 3.0 beta changes
- #5182 - Fix flatdict version pin to allow 4.1.0+
- #5195 - Add NCCL troubleshooting notes
- #5406 - Updates doc building job on main to match develop
- #5311 - Update skrl integration for version 2.0.0
- #5482 - Adds nightly-changelog.yml on main
- #5527 - Use isaaclab-bot GitHub App token for nightly changelog push
- #5537 - Address deprecation warnings in nightly changelog workflow
- #5746 - Fix .dockerignore for _isaac_sim symlink
- #5745 - Parameterize nightly compile over configurable branches
- #5546 - Fix swapped preserve_order docstrings
- #5817 - Update skrl agent configurations in the Isaac Lab template
kellyguo11 added a commit to kellyguo11/IsaacLab-public that referenced this pull request May 28, 2026
# Description

Merge changes from main branch:

- isaac-sim#4875 - Adds Isaac-Stack-Cube-Franka-IK-Rel-v0 task variants
- isaac-sim#4909 - Updates minor RSL-RL configclass docstring
- isaac-sim#4934 - Updates Newton docs on main for 3.0 beta changes
- isaac-sim#5182 - Fix flatdict version pin to allow 4.1.0+
- isaac-sim#5195 - Add NCCL troubleshooting notes
- isaac-sim#5406 - Updates doc building job on main to match develop
- isaac-sim#5311 - Update skrl integration for version 2.0.0
- isaac-sim#5482 - Adds nightly-changelog.yml on main
- isaac-sim#5527 - Use isaaclab-bot GitHub App token for nightly changelog push
- isaac-sim#5537 - Address deprecation warnings in nightly changelog workflow
- isaac-sim#5746 - Fix .dockerignore for _isaac_sim symlink
- isaac-sim#5745 - Parameterize nightly compile over configurable branches
- isaac-sim#5546 - Fix swapped preserve_order docstrings
- isaac-sim#5817 - Update skrl agent configurations in the Isaac Lab template
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.

2 participants