Spaces:
Sleeping
Sleeping
Create Dockerfile
Browse files- Dockerfile +33 -0
Dockerfile
ADDED
@@ -0,0 +1,33 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
# Use an official Golang runtime as a parent image
|
2 |
+
FROM golang:1.21
|
3 |
+
|
4 |
+
# Install necessary dependencies
|
5 |
+
RUN apt-get update && apt-get install -y \
|
6 |
+
wget \
|
7 |
+
git \
|
8 |
+
curl \
|
9 |
+
zip \
|
10 |
+
&& rm -rf /var/lib/apt/lists/*
|
11 |
+
|
12 |
+
# Install Katana
|
13 |
+
RUN go install github.com/projectdiscovery/katana/cmd/katana@latest
|
14 |
+
|
15 |
+
# Set the GOPATH and add Katana to PATH
|
16 |
+
ENV GOPATH=/go
|
17 |
+
ENV PATH=$GOPATH/bin:/usr/local/go/bin:$PATH
|
18 |
+
|
19 |
+
# Copy the Gradio app code to the container
|
20 |
+
COPY app.py /app/app.py
|
21 |
+
|
22 |
+
# Set the working directory
|
23 |
+
WORKDIR /app
|
24 |
+
|
25 |
+
# Install Python dependencies
|
26 |
+
RUN apt-get update && apt-get install -y python3-pip
|
27 |
+
RUN pip3 install gradio requests
|
28 |
+
|
29 |
+
# Expose the port Gradio will run on
|
30 |
+
EXPOSE 7860
|
31 |
+
|
32 |
+
# Command to run the Gradio app
|
33 |
+
CMD ["python3", "app.py"]
|