From 7e59befc0944df1d0d11313190dbdd6a4f063d37 Mon Sep 17 00:00:00 2001 From: fab Date: Sat, 31 Aug 2024 10:27:26 +0200 Subject: [PATCH] Create Dockerfile --- lxc_autoscale/Dockerfile | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) create mode 100644 lxc_autoscale/Dockerfile diff --git a/lxc_autoscale/Dockerfile b/lxc_autoscale/Dockerfile new file mode 100644 index 0000000..13f5662 --- /dev/null +++ b/lxc_autoscale/Dockerfile @@ -0,0 +1,22 @@ +# Start with a base image +FROM python:3.9-slim + +# Set environment variables (if needed) +ENV POLL_INTERVAL=300 +ENV CPU_UPPER_THRESHOLD=80 +ENV CPU_LOWER_THRESHOLD=20 + +# Create a directory for the app +WORKDIR /app + +# Copy the application files to the container +COPY lxc_autoscale /app/ + +# Install Python dependencies +RUN pip install --no-cache-dir -r /app/requirements.txt + +# Set up SSH (if needed) +RUN apt-get update && apt-get install -y openssh-client && rm -rf /var/lib/apt/lists/* + +# Set the entry point to run your application +ENTRYPOINT ["python", "/app/lxc_autoscale.py"]