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

fix: Add dos2unix and file commands for Windows compatibility #6906

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

RyosukeTanaka
Copy link

@RyosukeTanaka RyosukeTanaka commented Feb 23, 2025

Fix Docker Build Issues for Windows Environment

Changes

  1. Add required packages to Dockerfile

    • dos2unix: for line ending conversion
    • file: for file format verification
  2. Improve entrypoint.sh handling

    • Convert line endings properly
    • Ensure correct execution permissions
    • Add file format verification

Rationale

  • Resolve build failures on Windows environment
  • Improve cross-platform compatibility

Testing

  • Confirmed successful Docker build on Windows
  • Verified proper execution of entrypoint.sh

Error Before Fix

Fixes #6905

- Add dos2unix package for line ending conversion
- Add file package for format verification
- Ensure proper entrypoint.sh handling
- Fix Docker build issues on Windows environment
@@ -32,6 +32,15 @@ FROM python:3.12.3-slim AS openhands-app

WORKDIR /app

# 必要なパッケージをすべてインストール
Copy link
Collaborator

Choose a reason for hiding this comment

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

Can you revert these comments or translate to english?


# その後entrypoint.shをコピーして処理
COPY containers/app/entrypoint.sh /app/entrypoint.sh
RUN chmod +x /app/entrypoint.sh && \
Copy link
Collaborator

Choose a reason for hiding this comment

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

I'm worried that we lost the chown here

Copy link
Author

Choose a reason for hiding this comment

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

you are right, reverting those

@RyosukeTanaka RyosukeTanaka marked this pull request as draft February 28, 2025 07:03
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.

[Bug]: Docker Build Failure in Windows Environment
2 participants