Illustration: Docker container security - disabling SSH for production environments.

[Dockerfile] How to Prevent Docker Container from SSHing

While SSH is a valuable tool for debugging and testing Docker containers, enabling it in production environments is not recommended due to security concerns. To disable SSH in a Docker container, it’s advisable to remove the SSH server during the image building process. One way to accomplish this is to remove the SSH server during the Docker image building process. For example, if you’re using the alpine base image, you can use the following Dockerfile: ...

[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. ...

[Dokku] How to set up dokku to deploy docker image

About installing the dokku, I have written another post before: How to install Dokku with Portainer. So I will assume that you have Dokku installed in your server in this post. 1. Environment Setting Dokku: version: 0.27.5. HTTP port: 80, HTTPS port: 443, SSH port: 5022 IP of remote server where the Dokku is installed: 166.23.44.25 (example) Domain: example.com Name of App that will be deployed by Dokku: blog Port of App: 3000 2. SSH Configuration Generate ssh key public file id_rsa.pub ssh-keygen -o We will name the file as dokku_rsa, then you will see two files are generated: dokku_rsa and dokku_rsa.pub. ...

[DroneCI] How to Configure Pipeline to Build and Push Docker Image

Sometimes we need to build Dockerfile to the docker image and push it to registry in CI pipeline. For instance, my development environment is windows/amd64, but my VPS is linux/arm64. At the end, I want to host the service in my VPS. Thus, it will be easy to build the docker image inside the CI pipeline. In this post, I will show how to configure the pipeline to build and push docker image in DroneCI, which is a self-service Continuous Integration platform for busy development teams. ...

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