Closed txus closed 4 years ago
Do you have an example repo I could look at or fork?
Here's where the volume mount for /code gets set.
https://github.com/softprops/serverless-rust/blob/master/index.js#L62
I've run into this same issue (apologies, I raised this issue here: https://github.com/softprops/lambda-rust/issues/25 )--I could possibly provide a CircleCI config at least.
Here's a CirlceCI config that reproduces my issue.
However after reading a bit more about how the setup_remote_docker
directive works (specifically the fact that it's isolated from the job container) I started to think that the overall approach I was taking wasn't ideal.
So I was able to resolve my issue by switching to the machine
job type. Here's a working example:
deploy:
machine: true
#docker:
# - image: circleci/rust:latest-node
steps:
- checkout
#- setup_remote_docker
- run:
name: Deploy function
command: |
npm i -D serverless-rust
npx serverless deploy
Using machine: true
I'm able to deploy via CircleCI.
Just an update on this. The latest release adds experimental support for building locally which might solve this issue. I've set up integration tests on with github actions for linux, windows, and macos vms
https://github.com/softprops/serverless-rust#-experimental-local-builds
closing for now since its now possible to build without docker. feel free to reopen if you continue to see a problem when using the latest version
🐛 Bug description
I'm trying to do continuous deployment (of a private project) on CircleCI. When building the dockerized Rust image, it fails with this message (SLS_DEBUG=true):
It seems as if it can't mount the current directory as a volume?
🤔 Expected Behavior
It should have been able to build the image as it does locally.
👟 Steps to reproduce
It is a private project, but I'm pretty sure it happens with any serverless-rust project on CircleCI.
🌍 Your environment
Running on CircleCI, from image
rust:latest-node
and a remote docker env set up.OS: linux Node Version: 10.15.3 Serverless Version: 1.42.2 plugin version: 0.3.4