Logo

dev-resources.site

for different kinds of informations.

Dockerize Your Development: Build Reusable Features, Faster

Published at
10/8/2024
Categories
docker
containerapps
Author
busycaesar
Categories
2 categories in total
docker
open
containerapps
open
Author
10 person written this
busycaesar
open
Dockerize Your Development: Build Reusable Features, Faster

Docker is mostly used for deployment purposes or for creating isolated environments. However, there are many other ways it can be utilized. One way I want to promote is how Docker can separate several features of an application into different isolated and reusable images.

The Problem of Redundant Logic

Let me explain the concept using an example. Most applications we develop require authentication and authorization functionality. Each time we build an application, we not only create authentication APIs but also write the same logic repeatedly and in various tech stack as required by the project. When we write code, we ensure that it has no redundancy, but when viewed as a whole, we are still repeating the same logic across different applications.

This led me to think: what if there was an isolated application that I could use whenever I wanted to add authentication functionality to any of my applications? This approach would not only eliminate the effort of writing the same logic again but also allow me to focus more on the core functionality of the application. Most importantly, it would eliminate the responsibility of ensuring that this part of the application is well tested and running as expected.

How Docker Can Help

This is where Docker comes into play. Using the example of authentication functionality, we can develop an application that provides APIs for registering a new user, validating an existing user, handling JWT (JSON Web Tokens) or other authorization methods, etc. We can then dockerize the application and push the image to Docker Hub.

Once the image is built, the task of authentication and authorization is eliminated for any future developers. They can simply pull this image from Docker Hub, start the container, and use the APIs for authenticating users.

The additional benefit is that this application can be built in any tech stack and used across various tech stacks. Since the application is isolated, it can be made robust and well-tested. In other words, this application can be enhanced independently without affecting other parts of the project.

Final Words

There are many functionalities that can be isolated and reused in this manner. I have already worked on a sample project to demonstrate this concept, and you can check it out if you’re interested.

Lastly, I would love to hear your thoughts on this functionality offered by Docker. Additionally, what other ways, do you think, can Docker be used beyond deployment?

Citation
I would like to acknowledge that I took help from ChatGPT to structure my blog and simplify content.

containerapps Article's
30 articles in total
Favicon
Tackling CPU Throttling in Kubernetes for Better Application Performance
Favicon
What the Heck is Docker?
Favicon
A Step-by-Step Guide to CI/CD Pipeline for Angular App with Azure Container Apps
Favicon
Cool SHIT you can do with docker
Favicon
Deploying a stateless container on cloud run
Favicon
Dockerize Your Development: Build Reusable Features, Faster
Favicon
Docker For Beginners
Favicon
Preventing Out-of-Memory (OOM) Kills in Kubernetes: Tips for Optimizing Container Memory Management
Favicon
How and why did we improve our API hosting?
Favicon
Deploying a Java Azure Function on Azure Container Apps
Favicon
AWS App Runner: A quick start deploying Docker Container to AppRunner
Favicon
Deploying a Static Website with Docker: A Comprehensive Guide
Favicon
Day 12 of my 90-Devops Journey: CI/CD for Containerized Applications: A GitLab Guide
Favicon
How to containerize your web app- a beginner-friendly tutorial for Dockerfile
Favicon
Use LLMs in Java. An example with Merlinite, Quarkus, and Podman Desktop AI Lab
Favicon
How to Build a Container Image Running on Docker Hub.
Favicon
Android Encrypted Shared Preference access issue from new container
Favicon
What is Docker ?: Understanding the Concept of Containerization.
Favicon
How Azure Container Apps Simplify the Cloud Deployment Process
Favicon
docker compose : top level object must be mapping
Favicon
Deploying Containers with Security in mind (Beginner)
Favicon
Containerizing your Go application by using Docker
Favicon
Containerizing your Go application using Docker
Favicon
Revolutionize Your Dev Workflow: Containerization and Linux VPS Hosting for Streamlined Software Development
Favicon
Java application latency reduction and pitfalls
Favicon
A Beginner's Tour of NodePort, LoadBalancer, and Ingress Services
Favicon
Azure Container Apps: Zero to Hero
Favicon
Dev Container for React Native with Expo
Favicon
How to authenticate and register GitHub Runners hosted in Azure Container Apps with GitHub App via Azure Key Vault
Favicon
The Orchestration of The Ring

Featured ones: