-
-
Notifications
You must be signed in to change notification settings - Fork 735
Description
Is your request related to a problem? Please describe.
I need to build my npm dependencies in Docker using a command other than npm install
(e.g., npm install --only prod --no-bin-links
), but build_in_docker
is ignored for npm dependencies unless the build command is specifically npm
(and nothing more).
For example, the following builds, zips, and deploys with the build using Docker, but with the command npm install
.
build_in_docker = true
source_path = "path/to/my/javascript/lambda"
The following builds, zips, and deploys without using Docker:
build_in_docker = true
source_path = [
{
path = "path/to/my/javascript/lambda"
commands = ["npm install --only prod --no-bin-links --no-fund", ":zip"]
}
]
Describe the solution you'd like.
I'd like to be able to specify that I want my dependencies to build in Docker and use the custom build command I specify. I'd think this could be accomplished by checking to see if the specific command being run starts with npm
instead of requiring that it be npm
alone.
Describe alternatives you've considered.
I've considered trying to include the docker run...
part of the command in my custom build command, but that seems like it would forfeit some of this module's most valuable functionality.