An Alternative to Kubernetes

Kubernetes is an container-orchestration system which helps you to automate your deployment, scaling and management of containerized applications. Originally this platform was designed by Google and is today part of the Cloud Native Computing Foundation. Kubernetes is surely one of the major providers in the market of container operating systems.

But what many do not know, is the complexity of this platform if used in smaller projects. To understand this you need to know, that Kubernetes was designed for the operation of large cloud environments as they are operated by Google, Amazon or Microsoft.  This means that with the help of Kubernetes you can not only manage one server, but hundreds of servers with thousands of services. For most projects, this power is superfluous. Continue reading “An Alternative to Kubernetes”

docker-compose Fails After Network Is Removed

Today I run into a strange problem concerning docker-compose. I have several stacks defined in my developer environment. For some reason I removed old networks with the command

docker network prune

After that I was no longer able to start my aplications with docker-compose up:

docker-compose up
Creating network "myapp_default" with the default driver
Starting myapp_app_1 …
Starting myapp-db_1 … error
ERROR: for myapp-db_1 Cannot start service myapp-db: network 656be42244ac96cd35bf7fb786

The problem was that docker-compose created a new default network, but this was not defined for the already existing containers. Containers always connect to networks using the network ID which is guaranteed to be unique. And this ID was now no longer valid. 

One solution is to remove all existing containers maunally. A better solution is to shut down the conainers  with the command

$ docker-compose down

This will remove the internal Network IDs and you can restart the containers again with

$ docker-compose up

Docker Service to Backup a PostgreSQL Database

I have written a docker service to be used to periodically backup the data of a PostgreSQL Database. This container can be used to be part of a docker stack in a docker-compose.yml file.

version: '3.1'

services:
  ...
  backup:
    image: imixs/backup
    environment:
      SETUP_CRON: "0 3 * * *"
      BACKUP_POSTGRES_USER: "postgres"
      BACKUP_POSTGRES_PASSWORD: "xxxxxxxxxx"
      BACKUP_POSTGRES_HOST: "db"
      BACKUP_LOCAL_ROLLING: "5"
 ....

The service runs a cron job an uploads backup files automatically into a remote backup space via SFTP/SCP.

The Service is published on GitHub and DockerHub.

Lightweight Docker Swarm Environment

In the following short tutorial I want to show how to setup a lightweight and easy to manage docker-swarm environment. This environment is an alternative to the mostly heavyweight solutions like Rancher or Googles Kubernetes. For developers and companies that are not compelled to operate over 1000 machines on 4 different continents, this can be a clever alternative.

The docker-swarm environment, I am demonstrating here, uses Docker Engine CLI commands entered into a terminal. But as we’ll see, this environment also includes a very nice UI front end. You should be able to install Docker on networked machines and be comfortable with running commands in the shell of your choice.

Continue reading “Lightweight Docker Swarm Environment”

How to Setup a Private Docker Registry

In this short tutorial I will show how to setup a private Docker registry. A private registry can be helpful if you want to distribute docker images in a large developer team or provide docker images to your customers. The tutorial assumes that you have a server with a docker daemon running in your network environment or internet. The goal is to push locally build docker images to the docker registry, so that other team members or customers can pull those images without the need to build the images from a Docker file. In the Imixs-Workflow Project we use such a private registry to support our customers with custom docker images. Continue reading “How to Setup a Private Docker Registry”