-
Notifications
You must be signed in to change notification settings - Fork 293
Feature request: Add pre/post command for docker build #225
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
Comments
Not a bad idea. For situations like yours where you seem to be ok with separate then you could (with that plugin) do something like this: custom:
scripts:
hooks:
'before:requirements:pip:install': curl --silent -L https://example.com/source.tar.gz | tar xzf && docker run -v "$(pwd):/var/task:z" -u 0 sls-py-reqs-custom ./source/make install
'after:requirements:pip:install': cp -R /build .serverless/requirements |
@dschep Yeah but things like So it's better to have that hooks with e.g. custom:
pythonRequirements:
# hooks can be applied to both environment with/without docker
hooks:
# accepting both string or string array
'before:requirements:pip:install': ...
'after:requirements:pip:install':
- ...
- ...
|
+1 on this. Are there any updates on if we'll see this in the near future? |
@MrTeale, AFAIK no one is working on this. Sorry. |
Hey 👋 I'm closing this ticket as it looks like it's heavily outdated, we can of course reopen it if needed 👍 |
In case of a dependency that requires native binaries before
pip install
command,so currently I'm handling it like this way:
but if we have something like preDockerCmd / postDockerCmd, we can achieve it like this way:
reference:
https://stackoverflow.com/a/26274399/2305379
The text was updated successfully, but these errors were encountered: