Skip to content

Dockerless build option #58

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

Closed
wants to merge 11 commits into from
Closed

Conversation

durangatan
Copy link

What did you implement:

In order to deploy my rust serverless project in CircleCI, I need a build process that doesn't spawn a docker container that mounts volumes.

From the circle ci docs:

It is not possible to mount a volume from your job space into a container in Remote Docker (and vice versa).

I added a dockerless option that, instead of spawning a container, simply builds the lambdas and zips them in the current execution environment. build.sh is ripped directly fromlambda-rust.

Not sure if this is something you'd want to make available in this plugin; I know it assumes a lot about the user's execution environment. I just figured I'd make a PR upstream since it was really helpful in my project.

Closes: #xxx

How did you verify your change:

  • built my project locally and in circle ci with the dockerless option.
  • built my project locally without the dockerless option and it still works.

What (if anything) would need to be called out in the CHANGELOG for the next release:

dockerless custom option.

@softprops
Copy link
Owner

this looks great. I'm trying to wrap up some integration test issues for dev profiles then I can switch over to this. The dockerless option makes a lot of sense

@maxcountryman
Copy link

maxcountryman commented Nov 3, 2019

@durangatan another way around this is to use machine instead of docker for your build jobs. For a more complete example, see my comment here.

@durangatan
Copy link
Author

@maxcountryman thanks for pointing to that example. For my project the best option is to use the docker build type with a custom image (I need to install more than just rust and node).

@stitchyourphoto
Copy link
Contributor

@durangatan I'd be interested in seeing this get merged in, however, it looks like there are merge conflicts. Is there anything I can do to lend some assistance?

@durangatan
Copy link
Author

@stitchyourphoto I don't have bandwidth at the moment to complete this work but if you want to take a crack at it I wouldn't be opposed!

@softprops
Copy link
Owner

Sorry for dragging my feet on this for so long folks.

I wasn't sure how feasible this would be in practice.

I've built up some recent confidence in contributing what I've learned with this project to aws sam aws/aws-lambda-builders#174. I think I've gained a little more exposure to how to do this natively and think I can now take what I've learned with my approach in sam and make it an option here which I can release as an opt in feature.

@softprops softprops closed this May 28, 2020
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.

4 participants