Update Dockerfile
Browse files- Dockerfile +9 -12
Dockerfile
CHANGED
|
@@ -1,4 +1,5 @@
|
|
| 1 |
-
|
|
|
|
| 2 |
|
| 3 |
# Set environment variables
|
| 4 |
ENV PYTHONDONTWRITEBYTECODE 1
|
|
@@ -6,18 +7,14 @@ ENV PYTHONUNBUFFERED 1
|
|
| 6 |
ENV DEBIAN_FRONTEND=noninteractive
|
| 7 |
ENV TERM=xterm-256color
|
| 8 |
|
| 9 |
-
#
|
| 10 |
RUN apt-get update && \
|
| 11 |
-
apt-get install -y curl wget gnupg2 lsb-release nano
|
|
|
|
| 12 |
|
| 13 |
-
#
|
| 14 |
-
|
| 15 |
-
RUN
|
| 16 |
-
RUN apt-get update && \
|
| 17 |
-
apt-get install -y linux-headers-amd64 dkms virtualbox
|
| 18 |
-
|
| 19 |
-
# Install Python dependencies
|
| 20 |
-
RUN pip install --no-cache-dir -r requirements.txt
|
| 21 |
|
| 22 |
# Create a new user
|
| 23 |
RUN useradd -r -u 1000 -m -s /bin/bash appuser && \
|
|
@@ -30,4 +27,4 @@ RUN chmod +x /app/*
|
|
| 30 |
USER appuser
|
| 31 |
|
| 32 |
# Run pyxtermjs when the container starts
|
| 33 |
-
CMD ["
|
|
|
|
| 1 |
+
# Use Kali Linux as base image
|
| 2 |
+
FROM kalilinux/kali-rolling
|
| 3 |
|
| 4 |
# Set environment variables
|
| 5 |
ENV PYTHONDONTWRITEBYTECODE 1
|
|
|
|
| 7 |
ENV DEBIAN_FRONTEND=noninteractive
|
| 8 |
ENV TERM=xterm-256color
|
| 9 |
|
| 10 |
+
# Update and install necessary packages
|
| 11 |
RUN apt-get update && \
|
| 12 |
+
apt-get install -y python3 python3-pip curl wget gnupg2 lsb-release nano && \
|
| 13 |
+
apt-get clean
|
| 14 |
|
| 15 |
+
# Install Python dependencies (assuming requirements.txt is in the same directory)
|
| 16 |
+
COPY requirements.txt /app/requirements.txt
|
| 17 |
+
RUN pip install --no-cache-dir -r /app/requirements.txt
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 18 |
|
| 19 |
# Create a new user
|
| 20 |
RUN useradd -r -u 1000 -m -s /bin/bash appuser && \
|
|
|
|
| 27 |
USER appuser
|
| 28 |
|
| 29 |
# Run pyxtermjs when the container starts
|
| 30 |
+
CMD ["python3", "-m", "pyxtermjs", "--host", "0.0.0.0", "-p", "7860"]
|