35 lines
686 B
Docker
35 lines
686 B
Docker
FROM python:3-alpine AS pybuilder
|
|
|
|
COPY . .
|
|
RUN apk add py3-uv
|
|
RUN uv build
|
|
|
|
# Use an official Node.js runtime as a base
|
|
FROM node:20-alpine AS runtime
|
|
|
|
# Create app directory
|
|
WORKDIR /app
|
|
|
|
RUN apk add python3 py3-pip py3-uv
|
|
# RUN pip install uv
|
|
|
|
# Copy package.json and install dependencies
|
|
COPY package*.json ./
|
|
RUN npm install --omit=dev
|
|
|
|
# Copy wheel from builder and install
|
|
COPY --from=pybuilder dist/*.whl /app/dist/
|
|
RUN uv pip install --system --break-system-packages /app/dist/*.whl
|
|
RUN rm -r /app/dist/
|
|
|
|
# Copy the rest of the app
|
|
COPY cli.js .
|
|
|
|
# Make the script executable
|
|
RUN chmod +x cli.js
|
|
|
|
# Make ephemeral cache directory
|
|
RUN mkdir ./cache
|
|
|
|
ENTRYPOINT actual-imap-poll
|