anmonteiro / anmonteiro/aws-lambda-ocaml-runtime

How to run the basic example with only dune, no docker

Đang mở
#64 6 bình luận 0 reaction 0 người được giao Xem trên GitHub
Ngôn ngữ chính
OCaml
Star
207
Fork
11
Chỉ số merge pull request
Không có pull request nào được merge trong 30 ngày

Mô tả

Hi @anmonteiro

Do you have an idea as to why I receive this error from my basic lambda? I've changed the `build.sh` to build with only dune without docker. Although it's likely my build script is incorrect now and is the root issue of this, the basic example doesn't work as-is because it lacks the `esy.json` and `esy.lock` file that the dockerfile expects.
```
{
"errorMessage": "RequestId: 5489ab76-43af-4303-9ec8-9984e5ae7c44 Error: fork/exec /var/task/bootstrap: exec format error",
"errorType": "Runtime.InvalidEntrypoint"
}
```

```
#!/usr/bin/env sh

set -eo pipefail

root_path=$PWD

# Start in examples/basic/ even if run from root directory
cd "$(dirname "$0")"

rm -rf bootstrap
# possible that this is the issue because i left out --profile=static
dune build basic.exe
mv ../../_build/default/examples/basic/basic.exe ./bootstrap
zip -j ./ocaml.zip bootstrap

cd $root_path
```

Hướng dẫn đóng góp

Chưa lập chỉ mục được hướng dẫn đóng góp cho kho mã nguồn này

Đánh giá

Issue này chưa được đánh giá.

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.