Tag: Docker

Automating Docker Development Using NPM Scripts

Imagine having to type out lengthy commands repeatedly for tasks like building and running Docker containers. It would be tedious and time-consuming. However, by defining npm scripts, we can easily trigger these tasks with short and clear commands. It streamlines our workflow and reduces the effort...

How to use golang private modules with docker

In this article we are going to cover how we can setup a private go module and then reuse our module in a different application using docker. Firstly let’s quickly go over what exactly a private module is in golang and touch on the spotty history of private modules. Firstly let’s define ...

MLOps: Mastering Machine Learning Deployment: An Intro to Docker, Kubernetes, Helm, and Modern Web Frameworks-End To End Project

In the dynamic world of machine learning, the journey from developing a model to putting it into production is often seen as intricate and multifaceted. However, with the advent of tools like Docker, Kubernetes and user-friendly web frameworks such as FastAPI, Streamlit, and Gradio, this journey has...

Single-line Onboarding Using Docker Compose

All my career, I’ve worked at various startups that have had a very similar onboarding strategy. Because the company (and product) is small enough, it’s reasonable to ask the engineers to run the entirety of the product locally on their machine for development. If this sounds familiar, t...

How to Automatically Build and Deploy Your Front-end Demo Environment with Docker and GitLab CI: React & Vite & Mock.js

Absolutely, a well-crafted demo environment is your golden ticket in today’s front-end development landscape! Using Docker and GitLab CI, you can swiftly package and deploy your React and Vite-based projects. It’s a streamlined approach that not only enhances team collaboration but also ...

Prometheus Monitoring Stack — Efficient and Complete Set-Up with Docker-Compose

In this article, we will explore how to set up a full Prometheus monitoring stack using docker-compose. We will cover the configuration and deployment of Prometheus for metric collection, Grafana for data visualization, and Alertmanager for alert management. This guide is intended for those who are ...

Trimming the Docker Image: How I Made My Docker Images Slimmer with Vite, React, and Multi-Stage…

Ever felt your Docker images are wearing a few extra layers? I’ve been there. Dockerizing sample Vite + React app used to result in a chunky image. But then, I was introduced to multi-stage builds and everything changed. Let’s dive in, starting from the very beginning! Step 1: Setting...

Build the app with Docker

Throughout this guide, an example application written in Go is used to illustrate how the build features work. You don’t need to know the Go programming language to follow this guide. The starting resources for this guide include a simple Go project and a Dockerfile. From this starting...

The Whole Shebang: Compose Files

I have recently been writing and teaching a lot about Docker and containers in general. I’m very appreciative of those of you who consume my content and provide feedback. I hear you and naturally, the next topic to be tackled is Docker Compose — because since now you ...

Use Docker, Uptime Kuma, and Traefik To Monitor Your Website

Within this article, I want to show how you can set up website monitoring from your local PC or a server with Docker/Docker Swarm. Instead of using complicated monitoring stacks like prometheus, node-exporter, or graphana I want to show a lightweight alternative called Uptime Kuma which is written i...

A Collection of Docker Images To Solve All Your Debugging Needs

Whenever I troubleshoot anything container-related, I look for a good container image containing the right tools to troubleshoot and/or solve the problem. However, finding such an image, or assembling my own, is time-consuming and honestly just way too much effort. So, to save you and me the hass...

Data Engineering End-to-End Project — Spark, Kafka, Airflow, Docker, Cassandra, Python

First of all, please visit my repo to be able to understand the whole process better. This project will illustrate a streaming data pipeline and also includes many modern Data tech stack. I also want to mention that I used MacOS for this project. Tech Stack Python API Apache Airflow A...

Don't Install Python for Data Science. Use Docker Instead!

Docker containers provide a lightweight and efficient way to package and deploy applications, making it easier to move them between different environments, such as development, testing, and production. However, while Docker is widely used for deployment, it has been underutilized by developers for t...

MLOps: Mastering Machine Learning Deployment: An Intro to Docker, Kubernetes, Helm, and Modern Web Frameworks-End To End Project

Introduction: In the dynamic world of machine learning, the journey from developing a model to putting it into production is often seen as intricate and multifaceted. However, with the advent of tools like Docker, Kubernetes and user-friendly web frameworks such as FastAPI, Streamlit, and Gradio,...

Migration of Nginx Webserver to Highly Available Docker Containers on AWS using Docker Swarm

In this Cloud Migration project based on a real-world scenario, I acted as a DevOps Engineer migrating to AWS, a restaurant application that ran on-premises servers using Nginx. However, I needed to keep the Nginx solution and deploy it through containers, with high availability, and use Docker S...

Hello World! Airflow + Docker

Introduction What is Airflow? Airflow is a platform to programmatically author, schedule and monitor workflows. Airflow is invaluable for data professionals seeking to automate ETL workflows, streamline machine learning processes, or efficiently handle any task that requires automation with...

Do-it-yourself, building your own Databricks Docker Container

In a previous LinkedIn article, I aimed to persuade you of the numerous advantages of utilizing Docker containers on Databricks and shared various resources to help you create your own. However, I understand that these resources may not provide the clarity needed, requiring you to piece to...

Docker Simplified

Let’s suppose there’s a full stack web application using a specific set of technologies, including a web server, a database server, and particular dependencies with specified versions operating smoothly on a developer’s local machine. Yet, when transitioning to the production and c...

Beyond Docker: Emulation, Orchestration, and Virtualization in Apple Silicon

Over the last five years, I’ve delved deep into the world of microservices within big Kubernetes clusters. My typical workflow involves crafting solutions locally on my laptop, rigorously testing them, and subsequently committing my alterations to the master branch. Docker had long been my ...

Docker Image Security Made Easy

Introduction: Hey there! Docker is a cool tool for packing up your apps, but let’s make sure those packages are locked up tight. I am going to show you some super simple steps to secure your Docker images, no tech jargon involved! Step 1: Keep Docker Updated Think of Docker like a car...

NGINX with Self-Signed Certificate on Docker

While working with our code, we often need to quickly check if something works under HTTPS — or more importantly, how it behaves under HTTPS. There are plenty of guides online showing you how to create a Certificate Sign Request (CSR), how to self-sign that CSR, and how to manually modify your...

Don't Install Python for Data Science. Use Docker Instead!

Docker containers provide a lightweight and efficient way to package and deploy applications, making it easier to move them between different environments, such as development, testing, and production. However, while Docker is widely used for deployment, it has been underutilized by developers for t...

Monitoring and Logging Stack with Docker Compose

In this blog we are going to learn about the Docker Compose while orchestrating more than one containers of different monitoring and logging tools. Here the monitoring and logging tools we are using are Elastic Search, Logstash, Kibana , Prometheus and Grafana for which we will create a docker co...

How to deploy a Docker Image on AWS and Run it on Fargate

In this story, I will show you how to create and upload a Docker image from your computer to Amazon Elastic Container Registry (ECR) and Amazon Elastic Container Service (ECS) and run it on Fargate. You will create a Target group and an Application Load Balancer (ALB) that will act as a load balance...

Data Engineering End-to-End Project — PostgreSQL, Airflow, Docker, Pandas

In this article, we are going to get a CSV file from a remote repo, download it to the local working directory, create a local PostgreSQL table, and write this CSV data to the PostgreSQL table with write_csv_to_postgres.py script. Then, we will get the data from the table. After some mo...

Mastering Docker: Containers, Images, Networks, Optimization, and Docker Compose

Docker has revolutionized the way we package, distribute, and manage applications. In this comprehensive guide, we will delve into the essential aspects of Docker, including running your first container, managing volumes, working with Docker images, understanding different types of networks, optimiz...

Docker Secrets : Beginners Guide

Security has always been a big concern in the fields of development and DevOps. Storing important information like database passwords and API keys safely and securely has been a challenge. Docker, a revolutionary technology, makes it easier for developers to package and ship their apps. One cruci...

How to connect to the Docker host from inside a Docker container?

As of Docker version 18.03, you can use the host.docker.internal hostname to connect to your Docker host from inside a Docker container. This works fine on Docker for Mac and Docker for Windows, but unfortunately, this is not was not supported on Linux until Docker 20.10.0was ...

Run Keycloak locally with Docker compose

Follow up on my previous blog about running Keycloak in Docker with an external DB, in this document, I’d like to show you how you can achieve with docker compose easily Note: source codes can be found at https://github.com/ozbillwang/keycloak-compose Step One Update you...

Create Multi-Container Apps with Docker

Previously on this Docker journal series, I had my first hands-on experience with bind mounts and how they can be used to automate app dependency installation with a single docker run command. Now it’s time to run an app consisting of multiple containers simultaneously This...

Run PostgreSQL and PGAdmin using docker compose

Running PostgreSQL on native operating system is always a hassle. First we have to perform the installation on the respective operating system be it Linux, Windows or MacOS. The procedure of installation varies from OS to OS. We will use Docker (docker compose precisely) to deploy PostgreSQL alon...

How we reduced our docker build times by 40%

Similar to many companies, we build docker images for all components that are used in our product. Over time, a couple of these images became bigger and bigger and also our CI builds were taking longer and longer. My goal is that CI builds don’t take longer than 5 minutes. The idea comes from ...

MySQL Replication Using Docker Containers

Replication enables data from one MySQL database server (known as a source) to be copied to one or more MySQL database servers (known as replicas) (MySQL). The following steps are modified from the original guide at GitHub so that they could be run in PowerShell (Windows environment). T...

Superquick deployment of Elasticsearch using WSL+Docker Desktop

ELK stack is a popular choice for most people who are trying to learn and get their hands dirty in security operations or either someone in a small-medium enterprise who is looking for a one-stop solution for log aggregation, application performance monitoring or general security needs. There are...

Using AWS single sign-on within your Docker containers

If you deploy applications to Amazon AWS EC2 instances, you probably make a lot of use of Amazon-specific features. In my case, I happen to use Amazon’s Systems Manager to store configuration parameters for my applications. When developing code locally I would also like to be able to run th...

Build an Express App Using Bun and Deploy It To Render With Docker

In this post, we will scaffold a simple Express project using Bun, and then deploy it to Render using Docker. You’ll also get to see how much easier it is to get up and running locally with Bun than it is with Node. Let’s get started! Links Some links for reference: Bun in...

Switching from Docker Desktop to Podman on macOS M1/M2 ARM64 CPU

Background In a previous post, I discussed how to replace Docker Desktop with Minikube and Hyperkit on older AMD64 architecture machines running macOS. However, with the introduction of the new M1/M2 machines that use ARM64 architecture CPUs, Hyperkit is not compatible wi...

Docker RUN vs CMD vs ENTRYPOINT

In Docker build, the three instructions RUN , CMD and ENTRYPOINT look similar and all are instructions used in a Dockerfile to define various aspects of a Docker image. Sometimes it can easily cause confusions. Let’s discuss their differences in this article. R...

Part 2: How to list Docker images programmatically in Golang

In the previous article, we covered how to list Docker images, similar to the docker images command. In this article, our focus will be on listing images while exploring the available flag within the docker image command. Let's begin by examining the specific options we'l...

NTP Server on Docker: Keeping Your Devices in Perfect Sync

Network Time Protocol (NTP) is a communication protocol that allows the synchronization of clocks across devices using TCP/IP communication. NTP relies on a service or daemon running on a server connected to an atomic clock, a GPS receiver, or another precise timekeeping device. This server, often r...

Selenium script execution in AWS EC2 instance using selenium grid and docker containers

 In this use case, we will see how to execute the selenium script execution inside AWS EC2 instances using Selenium grid and docker image.  EC2 instance creation with preinstalled docker amazon Linux AMI  Go to AWS Management console, In AMI search for an ‘docker&rsquo...

Understanding Docker: My Dive into Containerization

Docker — it’s been a buzzword I’ve been hearing a lot lately, especially in the context of open-source development. Curiosity got the best of me, and I decided to dive into understanding this powerful tool and its potential. Here’s what I discovered! Docker: A Brief Overvi...

Migration of Nginx Webserver to Highly Available Docker Containers on AWS using Docker Swarm

In this Cloud Migration project based on a real-world scenario, I acted as a DevOps Engineer migrating to AWS, a restaurant application that ran on-premises servers using Nginx. However, I needed to keep the Nginx solution and deploy it through containers, with high availability, and use Docker S...

Step into the World of Docker

I first learned of Docker during my first SWE internship. The only thing I remember then was that I had to always have my Docker running. Now I understand more! Docker is widely used in open source projects, it is important to understand how and why they are in this much use. Docker is an ...

End-to-End Data Engineering Project — Airflow, Snowflake, DBT, Docker and DockerOperator

In this article, we are going to create an end-to-end data engineering pipeline using airflow, dbt and snowflake and everything will be running in docker. Given the dependency problems, we will have different containers for airflow and its components and the DBT. In order to run Airflow dags on anot...

Nginx and Let’s Encrypt with Docker in Less Than 5 Minutes

The other day, I wanted to quickly launch an nginx server with Let’s Encrypt certificates. I expected the task to be easy and straightforward. Turns out: I was wrong, it took a significant amount of time and it’s quite a bit more complicated. Of course, in the grand scheme o...

The Way of Dockerize a Spring Boot and MySQL Application With Docker Compose.

You can get instruction about docker installation from https://docs.docker.com/desktop/install/windows-install/.I have downloaded docker desktop to my local pc and It is wrapped up docker with docker compose. So no need to install docker compose separately. Overview My sample application ...

Creating and filling a Postgres DB with Docker compose

Many times we need to populate and eventually share a database with dummy data, either to test our pipelines, test queries, make a demo of the operation of a new service, or perhaps as a tool to apply testing to the future members of the company. Github repo: https://github.com/jdaarevalo/...

How to make your Python Docker images secure, fast & small

In the world of microservices, having secure, efficient, and compact Docker images is crucial for successful deployments. This blog will explore the key factors that contribute to building such images, including the importance of not running images as the root user, updating and upgra...

Docker-Compose and Mosquitto MQTT: Simplifying Broker Deployment

Eclipse Mosquitto is an open-source MQTT broker that implements MQTT protocols versions 5.0, 3.1.1, and 3.1. It is a lightweight system that can be installed on a variety of devices, from single-board computers like Raspberry Pi to servers. MQTT protocol provides an efficient and fast way to transmi...

Go projects and docker compose watch

docker compose watch (AKA hot reload) is now available to everyone. It’s a nice tool for automatic updating of running containers upon save. Something I haven’t seen discussed much on the internet or from Googling is how to use it with a Go project, so I thought I’d do...

Hello World! Airflow + Docker

Airflow is a platform to programmatically author, schedule and monitor workflows. Airflow is invaluable for data professionals seeking to automate ETL workflows, streamline machine learning processes, or efficiently handle any task that requires automation within the realm of data management. ...

Understanding the Benefits of Docker

In the rapidly changing world of modern software development, Docker has become a valuable asset for simplifying how applications are deployed. With its special ability to create containers, Docker has transformed the deployment of applications, providing multiple advantages for both development tea...

The Best Strategies to Slim Docker Images: How to Reduce Docker Image Size

You need Docker images to build and ship Docker containers. An image is the base of your container. Thus, keeping images slim and light speeds up the build and deployment of containers. Optimizing Docker images should be practiced in your containerization workflow. Your Docker image size matters for...

Linux Homelab Expansion: Part 1 Terraform and Docker

In this blog series, we’ll explore how Docker, Terraform, and KVM can revolutionize your Linux homelab experience. This first part of this series is a focus on Docker and Terraform. I got this idea because I have been interested in learning Terraform as well as learning more about Docker. I kn...

Running Android Emulator in a Docker Container

Are you looking for a reliable and efficient solution for running an Android emulator for testing, debugging, and continuous integration/continuous deployment (CI/CD) in your development pipeline? In this blog post, we will not only explore the benefits of using a Docker container to run your And...

Day 19: A Comprehensive Guide to Volumes, Networks, and Docker Compose

Docker, the powerhouse of containerization, empowers developers to create, deploy, and scale applications seamlessly. In this immersive guide, we’ll deep dive into advanced Docker concepts: volumes, networks, and Docker Compose. Prepare to unlock the potential of these tools and elevate your c...

Sepsis Prediction API with FASTAPI and Docker

An API (Application Programming Interface) serves as a bridge or intermediary that allows different software systems or components to communicate and interact with each other. Just like a physical bridge connects two separate locations, an API enables data and functionality to flow between different...

Run Keycloak in docker with extenal DB

Introduction: Keycloak is a popular open-source identity and access management solution that provides robust authentication and authorization services. Problems Outdated Keycloak Image “jboss/keycloak” Docker image has not received updates in the past year, resulting in potentia...

DevSecOps: Deploying the 2048 Game on Docker and Kubernetes with Jenkins CI/CD

Hello friends, we will be deploying a React Js 2048 Game. We will be using Jenkins as a CICD tool and deploying our application on a Docker container and Kubernetes Cluster. I Hope this detailed blog is useful. Youtube video : https://youtu.be/21Z-u8Fd_Mk?si=Ux4WabhFAxtYH9-g GitHub Repo :...

Preparation, Docker Image Push and Deployment for Containerized Voting Application in Kubernetes Cluster using Docker, Azure Container Registry (ACR) and Azure Kubernetes Service (AKS)

This is another project based on a real-world scenario, where I had to act as a DevOps Engineer, and show a new team member how to deploy an application on a Kubernetes cluster. This cluster is part of The Cloud Bootcamp project, and I prepared this new team member to deploy the voting applicatio...

Linux Homelab Expansion: Part 1 Terraform and Docker

In this blog series, we’ll explore how Docker, Terraform, and KVM can revolutionize your Linux homelab experience. This first part of this series is a focus on Docker and Terraform. I got this idea because I have been interested in learning Terraform as well as learning more about Docker. I kn...

Docker Container as Jenkins Agent

This article gives a walk through on the steps to set docker container as a Jenkins agent. Photo by Luca Bravo on Unsplash What if you are building a huge project which involves multiple scripts, multiple environment variables, multiple actions which has to be performed on a...

How to change docker root data directory

The standard data directory used by docker is /var/lib/docker, and since this directory will store all your images, volumes, etc. it can become quite large in a relative small amount of time. If you want to move the docker data directory on another location you can follow the following simple ste...

Run A GUI APPs inside a Docker Container

In this article, we are going to run a Firefox application which is basically a GUI Software inside a Docker Container. What are Linux containers? Linux containers are technologies that allow you to package and isolate applications with their entire runtime environment — all of the files...

How to use Docker on Windows 10 (without Docker Desktop)

In this tutorial I will show you how to run Docker on Windows 10 without installing Docker Desktop (which is paid software). 1. Check if you have WSL 2 enabled on your system Type this command in PowerShell: wsl -l -v You should see version 2 of WSL, if not you will need to instal...

Run Code on Linux (Mac) & Windows with Docker EASY

Consider this scenario: you want to test out some new AI model you’ve just read about on Medium.com, but you’ve noticed that the code requires a Linux or Mac operating system. How do you get past this? Docker provides a practical solution and helps to streamline the process of running...

Tutorial: Docker Installation in WSL 2 of Windows

Inthis story, I record my steps by installing Docker in WSL of Windows. The full name of WSL is Windows Subsystem for Linux. While I can install docker in Windows directly, I want to use Linux commands such as curl. WSL is a good way to do it. Also, using WSL, I do not need...

How to show X11 windows with Docker on Mac

I never would have thought that I would need this feature. Up until now, I only used Docker to get some non-UI environments running, like a local PostgreSQL database or an Android build environment for GitLab CI. Right now I am part of a team called ‘Happy Robots’ that works on the fi...