apitest / Dockerfile
shethjenil's picture
Upload Dockerfile
dc3836b verified
raw
history blame contribute delete
423 Bytes
FROM python:3.11
# Create a non-root user
RUN useradd -ms /bin/bash myuser
# Set the working directory
WORKDIR /code
# Copy the project files
COPY . .
# Install Python dependencies
RUN pip install flask requests
# Change ownership of the code directory to the non-root user
RUN chown -R myuser:myuser /code
# Switch to the non-root user
USER myuser
# Set the command to run your application
CMD ["python", "app.py"]