Skip to content

Commit

Permalink
Create Dockerfile
Browse files Browse the repository at this point in the history
  • Loading branch information
fabriziosalmi authored Aug 31, 2024
1 parent 331a312 commit 7e59bef
Showing 1 changed file with 22 additions and 0 deletions.
22 changes: 22 additions & 0 deletions lxc_autoscale/Dockerfile
Original file line number Diff line number Diff line change
@@ -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"]

0 comments on commit 7e59bef

Please sign in to comment.