diff --git a/Dockerfile b/Dockerfile index 16fb436..404a01b 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,18 +1,21 @@ -FROM denoland/deno:2.1.4 - -ENV DATA_DIR=/app/data +FROM denoland/deno:2.1.4 AS build WORKDIR /app COPY . . -RUN deno run -A npm:playwright install --with-deps firefox &&\ - deno install --allow-import --allow-ffi --allow-scripts=npm:sharp@0.33.5-rc.1 -e main.ts &&\ - sed -i -e 's/"deno"/"no-deno"/' node_modules/@libsql/client/package.json &&\ - mkdir -p $DATA_DIR +ENV DATA_DIR=/app/data + +RUN apt-get update && apt install -y curl && \ + deno run -A npm:playwright install --with-deps firefox && \ + deno install --allow-import --allow-ffi --allow-scripts=npm:sharp@0.33.5-rc.1 -e main.ts && \ + sed -i -e 's/"deno"/"no-deno"/' node_modules/@libsql/client/package.json &&\ + mkdir -p $DATA_DIR &&\ + deno task build -RUN deno task build EXPOSE 8000 +# Start the application CMD ["run", "-A", "main.ts"] +