aws-lambda-libreoffice
aws-lambda-libreoffice copied to clipboard
javaldx: Could not find a Java Runtime Environment!
trafficstars
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!