hunt / Dockerfile
zuehue's picture
Update Dockerfile
74b7132 verified
# Use an official Python runtime as a parent image
FROM python:3.10
# Create a new user and group
RUN groupadd -r ghunt && useradd -r -g ghunt ghunt
# Set the working directory in the container
WORKDIR /app
# Copy the current directory contents into the container at /app
COPY . /app
# Clone the ghunt repository
RUN git clone https://github.com/thewizardcodex/ghunt.git
RUN ls -la
COPY --chown=ghunt . /app
COPY --chown=ghunt ./creds.m creds.m
COPY --chown=ghunt . /ghunt /ghunt
# Move creds.m to the appropriate location inside the ghunt folder
RUN mv creds.m /app/ghunt/creds.m
# Change the working directory to the ghunt folder
WORKDIR /app/ghunt
# Install the required packages from the ghunt repository
RUN pip install --no-cache-dir -r requirements.txt
# Change ownership of the ghunt directory to the new user
RUN chown -R ghunt:ghunt /app
# Switch to the new user
# Expose port 7860 for the application
EXPOSE 7860
# Run the hunt.py script using uvicorn
CMD ["python3", "main.py", "email", "zedkindevil@gmail.com"]