Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Typo fix Update bootstrap_test.sh #10013

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

Conversation

mdqst
Copy link

@mdqst mdqst commented Nov 16, 2024

Problem:

In the script, the docker run command contains a syntax error due to the absence of a space after the -v flag in the volume mount definition:

-v/run/user/$UID/docker.sock:/var/run/docker.sock

Without the space, the argument is interpreted incorrectly as a single token (-v/run/user/$UID/docker.sock:/var/run/docker.sock), causing the docker command to fail with a syntax error.

Solution:

Add a space between the -v flag and the volume path, ensuring the argument is parsed correctly:

-v /run/user/$UID/docker.sock:/var/run/docker.sock

Updated Code:

docker run -ti --rm -v /run/user/$UID/docker.sock:/var/run/docker.sock -v $(git rev-parse --show-toplevel):/repo:ro bootstrap-build /bin/bash -c "

Why This Matters:

  1. Correct Argument Parsing: Docker requires the volume mount paths to be clearly separated from the -v flag by a space. Failing to do so leads to command execution errors.
  2. Reliability: This fix ensures the script runs consistently across environments and prevents confusion for developers using this script.
  3. Standard Compliance: The fix aligns with Docker's documented requirements for CLI argument formatting.

Testing:

  • The updated script has been tested to confirm that the docker run command executes successfully with the corrected syntax.
  • Verified that both volume mounts (/run/user/$UID/docker.sock and the repository path) are correctly mapped inside the container.

Impact:

This is a critical fix to ensure the script runs as intended. Without this change, the script fails during execution, potentially blocking workflows that depend on it.

Fix missing space in docker run volume mount argument
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant