Sign inSign up

smitwaman/fastapi

By smitwaman

•Updated over 2 years ago

Repository for Test application using FastAPI.

Image
API management
0

109

smitwaman/fastapi repository overview

⁠smitwaman/fastapi:20240611

⁠Overview

The smitwaman/fastapi:20240611 Docker image provides a simple web application built with FastAPI. This app displays personal information in a stylish HTML format. It demonstrates how to create and deploy FastAPI applications using Docker.

⁠Features
  • FastAPI Framework: Utilizes FastAPI for creating fast and efficient web APIs.
  • Stylish Web Interface: Displays a "Hello, World!" greeting and personal information with CSS styling.
  • Dockerized: Easily deployable using Docker for consistent environments across stages.
⁠Application Details

This application displays:

It also includes a note: "This is a test application assignment for submission at Wobot Intelligence Technology using FastAPI."

⁠Usage
⁠Pulling the Image

To pull the smitwaman/fastapi:20240611 image from the Docker repository, use:

docker pull smitwaman/fastapi:20240611
⁠Running the Container

To run the Docker container, execute:

docker run -d -p 8000:9009 smitwaman/fastapi:20240611

Access the application by navigating to http://localhost:8000 in your web browser.

⁠Dockerfile

Here is an example Dockerfile used to build this image:

FROM python:3.11-slim

WORKDIR /app

COPY requirements.txt requirements.txt
RUN pip install --no-cache-dir -r requirements.txt

COPY main.py main.py

CMD ["uvicorn", "main:app", "--host", "0.0.0.0", "--port", "9009"]
⁠Conclusion

The smitwaman/fastapi:20240611 Docker image provides an example of deploying a FastAPI application in a Docker container. It is a useful reference for developers starting with FastAPI and Docker, offering a simple starting point for further development.

Tag summary

Content type

Image

Digest

sha256:cca50bfbf…

Size

75.4 MB

Last updated

over 2 years ago

docker pull smitwaman/fastapi:v1