Skip to content

Comments

Fix: Correct RUN command structure in Dockerfile#7

Open
CaptainRong wants to merge 1 commit intosbaresearch:masterfrom
CaptainRong:fix-dockerfile-run-command
Open

Fix: Correct RUN command structure in Dockerfile#7
CaptainRong wants to merge 1 commit intosbaresearch:masterfrom
CaptainRong:fix-dockerfile-run-command

Conversation

@CaptainRong
Copy link

Fix: Correct Dockerfile RUN command structure for git install


Description:

This PR fixes the issue where the apt-get install git command was misplaced in the Dockerfile. Due to a missing continuation backslash (\) on the preceding line, this command was detached from the main RUN instruction block, causing the Docker build process to fail with a syntax error.

Changes Made:

  • Moved the apt-get -y install git statement into the end of the first multi-line RUN instruction block.
  • Ensured the continuity of commands within the RUN block, allowing it to execute correctly.

Motivation and Context:

I get an error when doing make build on my archlinux and cannot continue to build
This fix is ​​necessary because it resolves the syntax error that prevents the Docker image from being successfully built. After the fix, the Dockerfile can perform all dependency installation steps, including the installation of "git".

How Has This Been Tested?

I have successfully built the image based on the modified Dockerfile in my local environment (Arch Linux with Docker-desktop) using the command make build-image. This confirmed that git was installed correctly and subsequent steps (like git clone) could be executed

Types of changes:

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • Documentation update
  • Other (please describe):

Checklist:

  • My code follows the style guidelines of this project (or general best practices)
  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas (May not be needed for this specific change)
  • I have made corresponding changes to the documentation (if applicable)
  • My changes generate no new warnings
  • I have added tests that prove my fix is effective or that my feature works (May not be directly applicable for this Dockerfile fix)

This is my first contribution attempt, and I hope it's helpful! Please let me know if any further changes are needed. Thank you! ^^

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