Skip to content
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

javaldx: Could not find a Java Runtime Environment! #305

Open
chase-byteamite opened this issue Mar 13, 2024 · 0 comments
Open

javaldx: Could not find a Java Runtime Environment! #305

chase-byteamite opened this issue Mar 13, 2024 · 0 comments

Comments

@chase-byteamite
Copy link

My Dockerfile:

Use the LibreOffice base image

FROM public.ecr.aws/shelf/lambda-libreoffice-base:7.6-node18-x86_64

dependency not supplied by lambda-libreoffice-base image

RUN yum install java-1.8.0-openjdk-devel -y

Check Java version to ensure it's installed

RUN java -version

Install TypeScript globally

RUN npm install -g typescript

Set the working directory to the Lambda task root

WORKDIR ${LAMBDA_TASK_ROOT}

Copy package.json and package-lock.json

COPY package*.json ./

Copy your project files

COPY . .

Copy your handler and other source files

COPY lib/handler.js ${LAMBDA_TASK_ROOT}/

Install npm packages, including TypeScript definitions

RUN npm install

Compile TypeScript to JavaScript

RUN tsc

Set the home directory to /tmp as recommended

ENV HOME=/tmp

Set the CMD to your handler (format: fileName.functionName)

CMD ["handler.handler"]

I get this error from the logs when the lambda is invoked: javaldx: Could not find a Java Runtime Environment!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

1 participant