[Docker] Configure Custom TLS Certificates for Docker API Using Docker-in-Docker

Hey there! Have you ever wanted to configure custom TLS certificates for Docker API, but didn’t want to mess up your local Docker environment before you’re sure everything is working smoothly? Well, fear not! I’ve got a secret recipe for you that involves using Docker-in-Docker (DinD) to run a temporary Docker container with custom TLS certificates mounted. To get started, let’s say you already have your custom TLS certificates ready in the path `/tmp/certs``. You can run the following command to start a temporary Docker container with custom TLS certificates mounted: ...

[Portainer] Web UI for Self-Host Docker Registry

Setting up a custom UI for a self-hosted private registry with Portainer can be a great way to manage your Docker images and control access to them. In this blog post, I’ll walk through the steps to set up a custom UI for a private registry using Portainer, a popular open-source tool for managing Docker containers. Step 1: Set up a private registry The first step in setting up a custom UI for a self-hosted private registry is to set up the registry itself. You can do this by running the following command: ...

[WSL/Swarm] Fail to Join Docker Swarm as Worker

1. Problem I was trying to set up a Docker Swarm environment in my home network. My plan was to run the Docker Swarm manager node in a WSL2 Ubuntu distro on my Windows laptop, and run the Docker Swarm worker node on my MacMini. Both of them have Docker Desktop installed. When I tried to add a worker to the Swarm, I received the following error: Error response from daemon: rpc error: code = Unavailable desc = connection error: desc = "transport: Error while dialing dial tcp 192.168.65.3:2377: connect: connection refused" My operation is as followed below ...

[Multipass] Command Cheatsheet

A quick reference guide for commonly used Multipass commands. 1. Launch multipass launch This command will launch a new instance of Ubuntu on your machine. 2. Install multipass install <image> This command will download and install a specific image of Ubuntu onto your machine. For example, multipass install 18.04 will install Ubuntu 18.04. 3. List multipass list This command will list all the instances of Ubuntu running on your machine. ...

[OCI] How to Setup Self-Host SMTP Server on Oracle Cloud Infrastracture($0 cost)

Configuring an SMTP Server on Oracle Cloud Infrastructure can be a useful way to send email messages from your applications or services. However, Oracle Cloud Infrastructure will block Port 25 by default and it cannot be removed by configuring engress rule in the security list. To bypass it, you will need to create an Email Relay in the Oracle Cloud Infarstracture. In this blog, I will show you how to configure the SMTP relay on Oracle Cloud Infrastructure (OCI). ...

[Linux] How to Compress Folder and Decompress File

1. Compress a folder To compress a folder in Linux, you can use the tar command. The tar command is used to create, manage, and extract files that are archived in the tar format. To compress a folder, you can use the -czvf flags, which tell tar to create a compressed archive, use gzip compression, be verbose, and use the file name that follows. First, navigate to the directory containing the folder you want to compress. Then, run the following command: ...

[Linux] How to Download Files and Folders from Remote Server

To use scp to download a file from a remote server to your local machine, you can use the following syntax: scp username@host:/path/to/remote/file /path/to/local/destination This will download the file located at /path/to/remote/file on the remote server, and save it to /path/to/local/destination on your local machine. You will need to replace username with your username on the remote server, host with the hostname or IP address of the remote server, and /path/to/remote/file and /path/to/local/destination with the actual paths to the remote file and the local destination, respectively. ...

[Mail Server] What is DKIM

DKIM (DomainKeys Identified Mail) is an email authentication method that allows the sender of an email to associate their domain name with the email message. This allows the recipient’s email server to check that the email message is authorized by the sender’s domain and has not been tampered with during transit. DKIM uses cryptographic signatures and public-key cryptography to verify the authenticity and integrity of email messages. When an email is sent, the sender’s mail server generates a digital signature for the message, which is then added to the email’s headers. The recipient’s mail server retrieves the sender’s public key from a DNS record and uses it to verify the signature. If the signature is valid, the recipient’s mail server can be confident that the email is from the domain it claims to be from and has not been altered in transit. ...

[Mail Server] What is SMTP Server

SMTP stands for Simple Mail Transfer Protocol. It is a protocol used for sending email messages between servers. Most email systems that send mail over the Internet use SMTP to send messages from one server to another, and to deliver messages to local mail clients like Microsoft Outlook or Apple Mail. An SMTP server is a computer that is responsible for sending and receiving email messages. It uses the SMTP protocol to communicate with other email servers, to receive messages from local clients, and to deliver messages to local clients. ...

[DroneCI] How to Build Multiarch Docker Image for Private Registry

Few months ago, I wrote a post about DroneCI: How to configure pipeline to build and push docker image. It worked well for multiple personal projects of mine. However, recently I am working on a new project which I want to deploy the image in the VPS instances with different platforms and architecture. 1. Solution Thanks to the Drcone CI plugin drone-docker-buildx, the task becomes a lot of easier. Here you go. ...

DigitalOcean Referral Badge
Sign up to get $200, 60-day account credit !