python-cd/Dockerfile

28 lines
652 B
Docker

# Use the official Python image as the base image
FROM python:latest
# Install Supervisord
RUN pip install supervisor flask
# Copy your Supervisord configuration file into the container
COPY supervisord.conf /etc/supervisor/supervisord.conf
COPY entrypoint.sh /usr/local/bin
# Create a directory for your Python script
WORKDIR /home/githook
# Copy your Python script into the container
COPY githook.py .
# Expose any necessary ports (if your script listens on a specific port)
EXPOSE 5000
EXPOSE 8080
WORKDIR /home/
# Define the command to start Supervisord
CMD ["entrypoint.sh"]
#CMD ["supervisord", "-c", "/etc/supervisor/supervisord.conf"]