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

Bug: sam invoke start-api doesn't mount sam artifacts on /var/task on Windows with Rancher Desktop #7807

Open
y-stm opened this issue Dec 19, 2024 · 2 comments
Labels
stage/needs-triage Automatically applied to new issues and PRs, indicating they haven't been looked at. type/feature Feature request

Comments

@y-stm
Copy link

y-stm commented Dec 19, 2024

Description:

Rancher Desktop seems to accept windows style path (C:\dir\to.aws-sam\build\Function) in bind mounts.
However, sam local start-api creates container with unix-like path style (/c/dir/to/.aws-sam/build/Function) bindings which doesn't bind our artifact to host.

Steps to reproduce:

  1. install Rancher Desktop and start instead of Docker Desktop
  2. create Hello World Example by sam init
  3. sam build to create artifact
  4. sam local start-api to start container with host artifact directory is bound to /var/task
  5. see result of docker container exec <created-container> ls /var/task

Observed result:

nothing listed

Expected result

files in .aws-sam/build/HelloWorldFunction listed

Additional environment details (Ex: Windows, Mac, Amazon Linux etc)

{
  "version": "1.132.0",
  "system": {
    "python": "3.12.6",
    "os": "Windows-11-10.0.26100-SP0"
  },
  "additional_dependencies": {
    "docker_engine": "26.1.5",
    "aws_cdk": "Not available",
    "terraform": "Not available"
  },
  "available_beta_feature_env_vars": [
    "SAM_CLI_BETA_FEATURES",
    "SAM_CLI_BETA_BUILD_PERFORMANCE",
    "SAM_CLI_BETA_TERRAFORM_SUPPORT",
    "SAM_CLI_BETA_RUST_CARGO_LAMBDA"
  ]
}
@y-stm y-stm added the stage/needs-triage Automatically applied to new issues and PRs, indicating they haven't been looked at. label Dec 19, 2024
@y-stm
Copy link
Author

y-stm commented Dec 19, 2024

This problem seems to be caused by #633 which fixes Docker Toolbox's issue.
It will be great if sam-cli works with other active projects such as Rancher or Podman instead of archived project.

@roger-zhangg roger-zhangg added the type/feature Feature request label Dec 23, 2024
@roger-zhangg
Copy link
Member

Hi, @y-stm , thanks for reaching out, we are currently tracking this as a feature request. If you have already investigated into the possible solution, maybe consider sending a PR. We always welcome community contributions, Thanks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
stage/needs-triage Automatically applied to new issues and PRs, indicating they haven't been looked at. type/feature Feature request
Projects
None yet
Development

No branches or pull requests

2 participants