serverless / serverless-python-requirements

⚡️🐍📦 Serverless plugin to bundle Python packages

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Option to override the path to known_hosts

k3karthic opened this issue · comments

Is there an existing issue for this?

  • I have searched existing issues, it hasn't been reported yet

Use case description

Using minikube on Hyper-V as a Docker platform while running on Windows poses a few unique quirks,

  • Docker volume mounts run on the VM and does not have access to the Windows filesystem
  • The homePath variable points to "C:\Users\<username>" while the VM needs "/home/docker"

Workarounds

  • Run minikube mount to pass the requirements.txt to the VM
minikube mount  C:\Users\<username>\AppData\Local\UnitedIncome\serverless-python-requirements:"/mnt/c/Users/<username>/AppData/Local/UnitedIncome/serverless-python-requirements"
  • Override dockerPrivateKey to point to a location in the VM

Issue: pip.js hardcodes the path to known_hosts using the homePath variable which results in an invalid location 'C:\Users\<username>/.ssh/known_hosts:/root/.ssh/known_hosts:z'.

Proposed solution (optional)

An option like dockerKnownHosts similar to dockerPrivateKey which can be used to set the path.