Dockerfiles
+48 −1 · 6 files changed
-
{container => codefiles/container}/Dockerfile+0 −0 -
{container => codefiles/container}/README.md+0 −0 -
container/primary/Dockerfile => codefiles/container/primary/Dockerfile.primary+1 −1 -
container/secondary/Dockerfile => codefiles/container/secondary/Dockerfile.secondary+0 −0 -
codefiles/src/Dockerfile.primary+23 −0 -
codefiles/src/Dockerfile.secondary+24 −0
@@ -5,7 +5,7 @@ FROM python:3.8-slim WORKDIR /app # Copy the current directory contents into the container at /app -COPY ../../codefiles/src/primary /app +COPY ../../primary /app # Install any needed packages specified in requirements.txt # Assuming you might have a requirements.txt for any Python dependencies @@ -0,0 +1,23 @@ +# Use an official Python runtime as a parent image +FROM python:3.8-slim + +# Set the working directory in the container +WORKDIR /app + +# Copy the current directory contents into the container at /app +COPY ./primary /app + +# Install any needed packages specified in requirements.txt +# Assuming you might have a requirements.txt for any Python dependencies +# For this example, it's likely empty but included for completeness +#COPY requirements.txt /app +#RUN pip install --no-cache-dir -r requirements.txt + +# Make port 12345 available to the world outside this container +EXPOSE 12345 + +# Define environment variable +ENV NAME Primary + +# Run primary.py when the container launches +CMD ["python", "primary.py"] @@ -0,0 +1,24 @@ +# Use an official Python runtime as a parent image +FROM python:3.8-slim + +# Set the working directory in the container +WORKDIR /app + +# Copy the current directory contents into the container at /app +COPY ./secondary /app + +# Install any needed packages specified in requirements.txt +# Assuming you might have a requirements.txt for any Python dependencies +# For this example, it's likely empty but included for completeness +#COPY requirements.txt /app +#RUN pip install --no-cache-dir -r requirements.txt + +# Make port 23456 available to the world outside this container +EXPOSE 23456 + +# Define environment variable +ENV NAME Secondary + +# Run secondary.py when the container launches +CMD ["python", "secondary.py"] +