Simple Flask web application that allows users to upload CSV files.
109
This repository contains the Docker configuration and image for the CSV Uploader App, a web application designed to handle CSV file uploads and processing. The Docker image encapsulates all the necessary dependencies, application code, and configurations required to run the application in any environment, ensuring consistency and portability.
Docker Image Details:- Image Name: csv-uploader-app Version: v0.2 Base Image: python:3.9-alpine Application: Flask-based web application Primary Language: Python Key Features:- Lightweight Base Image: The image is based on python:3.9-alpine, ensuring a minimal footprint and fast startup times. Security Enhancements: The application is configured to run as a non-root user, drop all unnecessary Linux capabilities, disable privilege escalation, and use the runtime default seccomp profile, adhering to best practices for container security. Built-in Dependencies: The Dockerfile installs all required dependencies, including Flask, Boto3, and Python Dotenv, directly within the image, eliminating the need for external dependencies during runtime. Environment Variables: The application uses environment variables (from a .env file) for configuration, making it flexible and adaptable to different environments. Port Configuration: The application runs on port 5000 within the container, with port 8080 mapped on the host for external access.
Running the Docker Container To run the csv-uploader-app:v0.2 Docker image, use the following command: docker run --rm -it -p 8080:5000 -v $(pwd)/.env:/app/.env --name csv-uploader-app csv-uploader-app:v0.2 -p 8080:5000: Maps port 8080 on your local machine to port 5000 inside the container. -v $(pwd)/.env:/app/.env: Mounts the .env file from your local directory to the /app directory inside the container. --name csv-uploader-app: Names the running container csv-uploader-app. --rm: Automatically removes the container when it exits. -it: Runs the container in interactive mode with a terminal.
Building the Docker Image:- If you need to build the Docker image from the Dockerfile: docker build -t csv-uploader-app:v0.2 . This command builds the Docker image with the tag v0.2 from the Dockerfile in the current directory.
Pushing the Docker Image to a Repository:- Tag the Image: docker tag csv-uploader-app:v0.2 rsharm49/casestudy:v0.2
Push the Image: docker push rsharm49/casestudy:v0.2
Content type
Image
Digest
sha256:d942965e6…
Size
116.1 MB
Last updated
about 2 years ago
docker pull rsharm49/casestudy:v0.2