repackage properly
This commit is contained in:
23
Dockerfile
23
Dockerfile
@@ -1,27 +1,34 @@
|
||||
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
|
||||
FROM node:20-alpine AS runtime
|
||||
|
||||
# Create app directory
|
||||
WORKDIR /app
|
||||
|
||||
RUN apk add python3 py3-pip
|
||||
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 requirements.txt and install dependencies
|
||||
COPY requirements.txt ./
|
||||
RUN pip3 install --no-cache-dir --break-system-packages -r requirements.txt
|
||||
# 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 . .
|
||||
COPY cli.js .
|
||||
|
||||
# Make the script executable
|
||||
RUN chmod +x cli.js
|
||||
RUN chmod +x watcher.py
|
||||
|
||||
# Make ephemeral cache directory
|
||||
RUN mkdir ./cache
|
||||
|
||||
ENTRYPOINT /app/watcher.py
|
||||
ENTRYPOINT actual-imap-poll
|
||||
|
||||
Reference in New Issue
Block a user