Skip to content

v1.2.0 - Container Security and Enhanced Logging

Choose a tag to compare

@Amnoor Amnoor released this 10 Jan 13:51
· 13 commits to main since this release
8594bf2

Overview

Version 1.2.0 focuses on hardening the application's security and improving the robustness of the logging system. This release introduces a more secure Docker container environment by implementing a multi-stage build, a non-root user, and a minimal scratch base image. The logging module has also been significantly enhanced to support multiple log levels and provide more structured output. Additionally, the build pipeline has been simplified for better maintainability.

What's New

  • Container Security Hardening
    • Implemented a multi-stage Docker build process to reduce the final image size and attack surface.
    • The application now runs as a non-root user (applicationuser) to mitigate potential security risks.
    • The final image is now based on a minimal scratch image, and Nginx has been replaced with busybox httpd.
  • Enhanced Logging
    • The logging module has been refactored to support multiple log levels: error, warn, info, log, debug, and trace.
    • Log messages are now consistently formatted with a timestamp and log level for easier debugging.
    • A bug in the logging logic that prevented DEBUG mode from working correctly has been fixed.
  • Simplified Build Pipeline
    • The GitHub Actions workflow has been simplified by removing the DockerSlim optimization step, which reduces build complexity and reliance on external tools

Upgrade Guide

Docker Users

To upgrade, pull the latest image from Docker Hub:

docker pull amnoorbrar/digital-clock:latest
docker run --rm -p 8080:80 amnoorbrar/digital-clock:latest

Building from Source

To build this version from source:

git clone https://github.com/Amnoor/Digital-Clock-Program.git
cd Digital-Clock-Program
git checkout v1.2.0
docker build -t digital-clock .
docker run --rm -p 8080:80 digital-clock

Compatibility

This release is fully backward compatible with previous versions. No breaking changes have been introduced.

Files Modified

  • .github (Folder, Modified):
    • workflows (Folder, Modified):
      • docker-push.yml (File, Modified)
  • assets (Folder, Unchanged):
    • background.jpg (File, Unchanged)
    • clock-icon.svg (File, Unchanged)
  • modules (Folder, Modified):
    • logs (Folder, Modified):
      • index.js (File, Modified)
  • style (Folder, Unchanged):
    • style.css (File, Unchanged)
  • .dockerignore (File, Modified)
  • Dockerfile (File, Modified)
  • index.html (File, Unchanged)
  • index.js (File, Modified)
  • LICENSE (File, Unchanged)
  • README.md (File, Unchanged)

Verification

This release has been tested for:

  • ✅ Successful multi-stage Docker image builds.
  • ✅ Correct application behavior when running as a non-root user.
  • ✅ Correct functionality of the enhanced logging system and DEBUG flag.
  • ✅ Simplified and successful execution of the GitHub Actions build pipeline.
  • ✅ Continued core clock functionality without regressions.

Links

Contributors


Full Changelog: