Skip to content

Commit

Permalink
Update Dockerfile
Browse files Browse the repository at this point in the history
  • Loading branch information
AnonCatalyst authored Aug 12, 2024
1 parent 098b560 commit ef00528
Showing 1 changed file with 12 additions and 13 deletions.
25 changes: 12 additions & 13 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,8 +1,5 @@
# Use an official Python base image with support for multiple platforms
FROM python:3.9-slim

# Set the working directory
WORKDIR /app
# Use a base Python image that supports multiple platforms
FROM python:3.9-slim AS base

# Install system dependencies
RUN apt-get update \
Expand All @@ -12,26 +9,28 @@ RUN apt-get update \
curl \
&& rm -rf /var/lib/apt/lists/*

# Install Rust and Cargo separately to handle potential issues
# Install Rust and Cargo
RUN curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y \
&& export PATH="/root/.cargo/bin:$PATH" \
&& rustup update \
&& rustup component add rustfmt

# Copy application code and necessary files
# Set the working directory
WORKDIR /app

# Copy the package files
COPY . .

# Upgrade pip and install Python dependencies
# Install Python dependencies
RUN pip install --upgrade pip \
&& pip install build twine \
&& pip install -r requirements.txt

# Build the package
RUN python -m build

# Command to run the application
CMD ["python", "ominis.py"]
# Set the entry point
ENTRYPOINT ["python", "-m", "build"]

# Optionally: define environment variables
ENV APP_ENV=production
ENV APP_DEBUG=False
# Expose any ports (if needed)
# EXPOSE 8000

0 comments on commit ef00528

Please sign in to comment.