memorium/Dockerfile

32 lines
949 B
Docker
Raw Normal View History

2025-01-18 01:28:48 +01:00
FROM gcr.io/distroless/base-debian11
2023-07-26 13:52:26 +02:00
2025-01-06 18:46:49 +01:00
ENV DATA_DIR=/app/data
2025-01-18 01:28:48 +01:00
ENV PLAYWRIGHT_SKIP_BROWSER_DOWNLOAD=0
2023-07-26 13:52:26 +02:00
WORKDIR /app
COPY . .
2025-01-05 23:53:36 +01:00
2025-01-18 01:28:48 +01:00
# Install necessary libraries and dependencies for Playwright and your application
RUN apt-get update && apt-get install -y --no-install-recommends \
curl \
libstdc++6 \
libgtk-3-0 \
libnss3 \
libxss1 \
libasound2 \
fonts-liberation \
&& curl -fsSL https://deno.land/x/install/install.sh | sh \
&& /root/.deno/bin/deno run -A npm:playwright install firefox \
&& /root/.deno/bin/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 \
&& rm -rf /var/lib/apt/lists/*
2023-07-26 13:52:26 +02:00
2025-01-18 01:28:48 +01:00
# Expose port 8000 for the application
2023-07-26 13:52:26 +02:00
EXPOSE 8000
2025-01-18 01:28:48 +01:00
# Use the Deno binary from the installed path to start the app
CMD ["/root/.deno/bin/deno", "run", "-A", "main.ts"]