From b5cd97d38c34227643e0f218ece5a760350b0db3 Mon Sep 17 00:00:00 2001 From: Anton Kamalov Date: Wed, 6 Nov 2024 01:08:21 +0300 Subject: [PATCH] RIS in Docker --- Dockerfile | 18 ++++++++++++++++++ requirements.txt | 3 +++ start.sh | 4 ++++ 3 files changed, 25 insertions(+) create mode 100644 Dockerfile create mode 100644 requirements.txt create mode 100755 start.sh diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..956acce --- /dev/null +++ b/Dockerfile @@ -0,0 +1,18 @@ +# Use the official Python image as a base +FROM python:3.9.20-alpine3.19 + +# Set the working directory inside the container +WORKDIR /app + +# Copy the contents of the 'App' folder to the working directory +COPY App/ /app + +# Copy the requirements file to the working directory +COPY requirements.txt /app + +# Install the dependencies from the requirements file +RUN pip install --no-cache-dir -r requirements.txt + +EXPOSE 5001 +# Command to run the application +CMD ["python", "app.py"] diff --git a/requirements.txt b/requirements.txt new file mode 100644 index 0000000..5684634 --- /dev/null +++ b/requirements.txt @@ -0,0 +1,3 @@ +cryptography==43.0.3 +Flask==3.0.3 +PyMySQL==1.1.1 diff --git a/start.sh b/start.sh new file mode 100755 index 0000000..19b19c4 --- /dev/null +++ b/start.sh @@ -0,0 +1,4 @@ +#!/bin/bash + +docker build -t ris:latest . +docker run -d -p 5001:5001 ris