-
Notifications
You must be signed in to change notification settings - Fork 293
Add custom Dockerfile workflow example #228
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
Add custom Dockerfile workflow example #228
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good idea! But why not use the dockerFile
option? Then you can skip the build step! and the config would be
custom:
pythonRequirements:
dockerFile: ./Dockerfile
Hm, actually the Docker support doesn't quite do what I want. I want to add the file Current build process:
After running |
I've updated the docs to handle both cases:
If there's a better way to implement 2 than "copy them into your repo" I'm all ears. Couldn't figure it out myself though :( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There's no reason AFAIK not to still use the lambci build image as the base, and it make the dockerfile smaller
FROM lambci/lambda:build-python3.6
# Install your dependencies
yum -y install mysql-devel
As for step2. that's fine 👍 |
Thanks for the feedback. Unfortunately I had issues installing packages into FROM lambci/lambda:build-python3.6
RUN yum install -y mysql-devel
WORKDIR /var/task
There are some workarounds in this thread of the issue:
Only the last one helped. If you like, I can change the example to use that (with a comment referencing the bug) with the lambci container? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah, I see. That's good enough reason for me.
As per #101.