Fix .dockerignore so the _isaac_sim host symlink is not copied into the image#5746
Conversation
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.
There was a problem hiding this comment.
🤖 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
- No over-exclusion risk: The pattern
_isaac_simwill only match files/directories named exactly_isaac_sim. It will not affect_isaac_sim_xyzor other variants. - If recursive matching was intended: The original
?pattern may have been a typo or miscommunication. If there was ever a need to match_isaac_simfollowed by exactly one character, that use case is now dropped (but this seems unintentional given the comment says "ignore isaac sim symlink"). - Alternative patterns: If both
_isaac_simAND variants like_isaac_sim1need 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_simis the correct fix.
Testing
.dockerignorechanges do not require unit tests- The fix can be verified by building the Docker image with a
_isaac_simsymlink 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 SummaryFixes a one-character
Confidence Score: 5/5Safe to merge — the change is a single-character correction to a The fix is minimal, targeted, and correct. The No files require special attention — only Important Files Changed
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 ✓"]
Reviews (1): Last reviewed commit: "Fix dockerignore pattern for _isaac_sim ..." | Re-trigger Greptile |
# 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
# 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
Description
.dockerignorehas long carried the entry:The
?in dockerignore glob syntax means exactly one character, so the pattern only matches names like_isaac_simXand does not match the bare_isaac_simsymlink that contributors create at the repo root.This was harmless until
docker/Dockerfile.baseswitched to a wholesaleCOPY --chown=isaaclab:isaaclab ../ ${ISAACLAB_PATH}/near the end of the image build. That broad copy now sweeps the host_isaac_simsymlink into the image, overwriting the in-image symlink that the earlierRUN ln -sf ${ISAACSIM_ROOT_PATH} ${ISAACLAB_PATH}/_isaac_simstep creates. Inside the container,_isaac_simends up pointing at the host path (e.g.../IsaacSim/_build/linux-x86_64/release), which doesn't exist there — so everyisaaclab.shcommand 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
Screenshots
N/A — one-character
.dockerignorechange.Checklist
pre-commitchecks with./isaaclab.sh --format.dockerignoreglob; verified manually)config/extension.tomlfile (N/A — nosource/<package>/touched)CONTRIBUTORS.mdor my name already exists there