Open dangdennis opened 2 years ago
So, re 1. Did you compile something on macOS to be executed on Linux?
And if you're on Linux, re 2. Did you ship a dynamically linked executable that can't find its libraries at runtime?
Ah this is indeed why I have to use the dockerfile for the linux build. I'm compiling on a m1 arm macbook.
Let's see if I hit 2 once I reinstate the use of docker. I'll use esy too then.
Logging my adventures here. Back to my original error with esy: As we can see here, building the docker image causes an error immediately on the lack of esy.json and esy.lock. We expect these files to exist because we write esy.json
and the result of running esy
should have generated esy.lock
.
=> CACHED [esy 9/18] RUN echo ' { "name": "package-base", "dependencies": { "ocaml": "4.9.0", "@opam/dune": "*" 0.0s
=> CACHED [esy 10/18] RUN esy 0.0s
=> ERROR [esy 11/18] COPY esy.json esy.json 0.0s
=> ERROR [esy 12/18] COPY esy.lock esy.lock
do you have a .dockerignore
?
Those files need to exist locally. The examples/basic
directory doesn't include them
I see only the dockerignore you’ve created.
If by locally, do you mean locally inside the docker image? Or within my own current file system. But often when I do a COPY, yes it’s from my own local file system into the image.
I’ll continue again tomorrow 🫠
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 theesy.json
andesy.lock
file that the dockerfile expects.