Skip to content

Lab04#4

Open
ellilin wants to merge 16 commits intomasterfrom
lab04
Open

Lab04#4
ellilin wants to merge 16 commits intomasterfrom
lab04

Conversation

@ellilin
Copy link
Owner

@ellilin ellilin commented Feb 19, 2026

No description provided.

Main Tasks (Python app):
- Add production-ready Dockerfile with best practices
  - Non-root user (appuser)
  - Specific base image version (python:3.13-slim)
  - Proper layer ordering for caching
  - Health check implementation
- Create .dockerignore for optimized build context
- Add Docker section to README.md with usage examples
- Create comprehensive LAB02.md documentation
- Push image to Docker Hub (ellilin/devops-info-service:v1.0.0)
- Final image size: 208MB

Bonus Task (Go app - Multi-stage build):
- Implement multi-stage Dockerfile for Go application
  - Stage 1: Builder (golang:1.21-alpine) for compilation
  - Stage 2: Runtime (alpine:3.19) for minimal footprint
  - Static binary with stripped symbols (-ldflags='-s -w')
- Create .dockerignore for Go
- Build 31.6MB final image (91% smaller than single-stage)
- Push to Docker Hub (ellilin/devops-info-service-go:v1.0.0)
- Create detailed LAB02.md documentation explaining:
  - Multi-stage strategy and benefits
  - Size comparison analysis
  - Security implications
  - Technical explanation of each stage

Security:
- Both apps run as non-root user
- Minimal base images for reduced attack surface
- No build tools in production images
- Proper health checks implemented
@github-actions
Copy link

Terraform Validation Results ✅

  • Terraform Format: Passed
  • Terraform Validate: Passed
  • TFLint: Passed
Details

Terraform configuration has been validated successfully!

Pushed by: @ellilin, Action: pull_request

@codecov-commenter
Copy link

⚠️ Please install the 'codecov app svg image' to ensure uploads and comments are reliably processed by Codecov.

Codecov Report

❌ Patch coverage is 96.75676% with 6 lines in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
app_python/app.py 88.46% 6 Missing ⚠️

📢 Thoughts on this report? Let us know!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants