Sign inSign up

althaf24/simple-time-service

By althaf24

•Updated over 1 year ago

Image
0

102

althaf24/simple-time-service repository overview

Image Overview: simple-time-service

The simple-time-service Docker image encapsulates a minimalist Python-based microservice designed to provide the current timestamp and the client's IP address in JSON format upon accessing the root (/) endpoint. Built using Flask, the application emphasizes lightweight deployment and adherence to container best practices.

Key Features:

Minimal Footprint: Utilizes the python:3.10-alpine base image, resulting in a compact image size of approximately 55.3 MB.​

Non-Root Execution: Configured to run under a non-root user (appuser) within the container, enhancing security.​

Ease of Deployment: Designed for straightforward deployment with simple Docker commands:​

docker build -t simple-time-service .

docker run -d -p 5000:5000 simple-time-service

Public Availability: The image is published on Docker Hub, allowing for easy access and integration into various environments.​

Usage:

Upon running the container, the service listens on port 5000. Accessing http://localhost:5000/⁠ returns a JSON response:​

{ "timestamp": "2025-04-16T15:54:26", "ip": "203.0.113.42" } This response provides the current server time in ISO 8601 format and the IP address of the requester.​

Repository & Documentation:

For source code, detailed documentation, and deployment instructions, please visit the GitHub repository.​

Tag summary

Content type

Image

Digest

sha256:b8096505f…

Size

23 MB

Last updated

over 1 year ago

docker pull althaf24/simple-time-service