diff --git a/Cargo.toml b/Cargo.toml index 8a183a4..3f5954c 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -15,6 +15,7 @@ serde = "1.0" serde_json = "1.0" cpython = { version = "0.1", default-features = false } cpython-json = { version = "0.2", default-features = false } +python3-sys = { version = "0.1.3", features = ["python-3-4"], optional = true } [features] default = ["cpython/python3-sys"] diff --git a/builder/Dockerfile b/builder/Dockerfile index 39125ae..7809331 100644 --- a/builder/Dockerfile +++ b/builder/Dockerfile @@ -1,7 +1,5 @@ -FROM amazonlinux:latest +FROM lambci/lambda:build-python3.6 RUN curl https://sh.rustup.rs -sSf | sh -s -- -y --default-toolchain stable -RUN yum install -y bzip2-devel gcc gcc-c++ git openssl-devel python27-devel python36-devel readline-devel sqlite-devel zip \ - && yum clean all ADD build.sh /usr/local/bin/ VOLUME ["/code"] WORKDIR /code diff --git a/builder/README.md b/builder/README.md index befbbda..bf2036c 100644 --- a/builder/README.md +++ b/builder/README.md @@ -5,11 +5,11 @@ The `Dockerfile` and `build.sh` script here help you build Lambda functions agai It's automatically built on Docker Hub as [ilianaw/crowbar-builder](https://hub.docker.com/r/ilianaw/crowbar-builder/) and can be invoked like this from your source tree: ```bash -docker run --rm -v $(pwd):/code:ro ilianaw/crowbar-builder > lambda.zip +docker run --rm -v $(pwd):/code:ro -e CARGO_FLAGS="--features crowbar/python3-sys" ilianaw/crowbar-builder > lambda.zip ``` If you need extra packages, add them as arguments: ```bash -docker run --rm -v $(pwd):/code:ro ilianaw/crowbar-builder openssl-devel > lambda.zip +docker run --rm -v $(pwd):/code:ro -e CARGO_FLAGS="--features crowbar/python3-sys" ilianaw/crowbar-builder openssl-devel > lambda.zip ```