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 ef00528 commit d206080
Showing 1 changed file with 42 additions and 3 deletions.
45 changes: 42 additions & 3 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -13,19 +13,58 @@ RUN apt-get update \
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
&& rustup component add rustfmt \
&& echo 'export PATH="/root/.cargo/bin:$PATH"' >> ~/.bashrc

# Set the working directory
WORKDIR /app

# Copy the package files
# Copy the requirements file and install Python dependencies
COPY requirements.txt .
RUN pip install --upgrade pip \
&& pip install build twine \
&& pip install -r requirements.txt

# Copy the rest of the application code
COPY . .

# Install Python dependencies
# Build the package
RUN python -m build

# Set the entry point
ENTRYPOINT ["python", "-m", "build"]

# Expose any ports (if needed)
# EXPOSE 8000# Use a base Python image that supports multiple platforms
FROM python:3.9-slim AS base

# Install system dependencies
RUN apt-get update \
&& apt-get install -y \
build-essential \
libffi-dev \
curl \
&& rm -rf /var/lib/apt/lists/*

# 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 \
&& echo 'export PATH="/root/.cargo/bin:$PATH"' >> ~/.bashrc

# Set the working directory
WORKDIR /app

# Copy the requirements file and install Python dependencies
COPY requirements.txt .
RUN pip install --upgrade pip \
&& pip install build twine \
&& pip install -r requirements.txt

# Copy the rest of the application code
COPY . .

# Build the package
RUN python -m build

Expand Down

0 comments on commit d206080

Please sign in to comment.