# Set up the base image # https://gallery.ecr.aws/awsguru/aws-lambda-adapter FROM public.ecr.aws/awsguru/aws-lambda-adapter:0.8.4@sha256:e2653f741cd15851ba4f13f3cc47d29f2d14377c7d11737bfa272baa1b569007 AS aws-lambda-adapter # https://hub.docker.com/r/denoland/deno # https://github.com/denoland/deno_docker FROM docker.io/denoland/deno:bin@sha256:49206ee7e411bba0ac80047814ce9d6ceaf4eabe36f8cde7445839b91f8f5df4 AS deno_bin # https://hub.docker.com/_/debian FROM docker.io/library/debian:bookworm-slim@sha256:1537a6a1cbc4b4fd401da800ee9480207e7dc1f23560c21259f681db56768f63 AS deno_runtime COPY --from=aws-lambda-adapter /lambda-adapter /opt/extensions/lambda-adapter COPY --from=deno_bin /deno /usr/local/bin/deno ENV PORT=8000 EXPOSE 8000 RUN mkdir /var/deno_dir ENV DENO_DIR=/var/deno_dir # Copy the function code WORKDIR "/var/task" COPY . /var/task # Warmup caches RUN timeout 10s deno run -A main.ts || [ $? -eq 124 ] || exit 1 CMD ["deno", "run", "-A", "main.ts"]