Docker container lazy loading

Overview

Lazytainer

Putting your containers to sleep

I don't really wanna do the work today


How it works

Lazy loading containers

monitor network traffic for active connections and recieved packets , if traffic looks to be idle, your container stops if it looks like you're trying to access a stopped container, it starts

Want to test it?

$ git clone https://github.com/vmorganp/Lazytainer
$ cd Lazytainer
$ docker-compose up 

Or put in your docker compose

  lazytainer:
    container_name: lazytainer
    image: ghcr.io/vmorganp/lazytainer:master
    environment:
      - PORT=81,82 # comma separated list of ports...or just the one 
      - LABEL=lazytainer # value of lazytainer.marker for other containers that lazytainer checks
      # - TIMEOUT=30 # OPTIONAL number of seconds to let container idle
      # - RXHISTLENGTH=10 # OPTIONAL number of seconds to keep rx history, uptime is calculated as first item and last item from this and must have a gap of at least $MINPACKETTHRESH
      # - MINPACKETTHRESH=10 # OPTIONAL number of packets that must be recieved to keepalive/start container 
    ports:
      - 81:81
    volumes:
      - /var/run/docker.sock:/var/run/docker.sock:ro

  whoami1:
    container_name: whoami1
    image: containous/whoami
    command: --port 81 # make this run on the port passed through on lazytainer
    network_mode: service:lazytainer
    depends_on: 
      - lazytainer # wait for lazytainer to start before starting
    labels:
      - "lazytainer.marker=lazytainer" # required label to make it work

TODO

  • improve logging - verbosity flags
Issues
  • not working

    not working

    the install went smoothly, but even though the concept looks promising, it isn't working

    debug log: ////////////////////////////////////////////////////////////////////////////////// 60 rx packets 60 packets recieved in the last 60 seconds 0 active clients

    running on a docker host with 60 running containers..... nothing gets stopped sind 30 mins.

    opened by mamema 6
Owner
Morgan Patterson
Morgan Patterson
Moby Project - a collaborative project for the container ecosystem to assemble container-based systems

The Moby Project Moby is an open-source project created by Docker to enable and accelerate software containerization. It provides a "Lego set" of tool

Moby 63.4k Jul 4, 2022
Boxygen is a container as code framework that allows you to build container images from code

Boxygen is a container as code framework that allows you to build container images from code, allowing integration of container image builds into other tooling such as servers or CLI tooling.

nitric 5 Dec 13, 2021
Amazon ECS Container Agent: a component of Amazon Elastic Container Service

Amazon ECS Container Agent The Amazon ECS Container Agent is a component of Amazon Elastic Container Service (Amazon ECS) and is responsible for manag

null 0 Dec 28, 2021
The Container Storage Interface (CSI) Driver for Fortress Block Storage This driver allows you to use Fortress Block Storage with your container orchestrator

fortress-csi The Container Storage Interface (CSI) Driver for Fortress Block Storage This driver allows you to use Fortress Block Storage with your co

Fortress 0 Jan 23, 2022
Vilicus is an open source tool that orchestrates security scans of container images(docker/oci) and centralizes all results into a database for further analysis and metrics.

Vilicus Table of Contents Overview How does it work? Architecture Development Run deployment manually Usage Example of analysis Overview Vilicus is an

Ederson Brilhante 77 Jun 21, 2022
Testcontainers is a Golang library that providing a friendly API to run Docker container. It is designed to create runtime environment to use during your automatic tests.

When I was working on a Zipkin PR I discovered a nice Java library called Testcontainers. It provides an easy and clean API over the go docker sdk to

null 1.4k Jun 26, 2022
A tool to restart a Docker container with a newer version of the image

repull A tool to restart a Docker container with a newer version of an image used by the container Often you may need to pull a newer version of an im

Eugene 23 May 14, 2022
A toolbox for debugging docker container and kubernetes with web UI.

A toolbox for debugging Docker container and Kubernetes with visual web UI. You can start the debugging journey on any docker container host! You can

CloudNativer 55 May 21, 2022
Go project to manage an ubuntu docker container

Go-docker-manager This project consist of a Go app that connects to a Docker backend, spans a Ubuntu container and shows live CPU/Memory information f

Miguel Sama 1 Oct 27, 2021
A docker container that can be deployed as a sidecar on any kubernetes pod to monitor PSI metrics

CgroupV2 PSI Sidecar CgroupV2 PSI Sidecar can be deployed on any kubernetes pod with access to cgroupv2 PSI metrics. About This is a docker container

null 1 Nov 23, 2021
Nanovms running in Docker x86 container for M1 Mac ARM64.

Docker Ops This project is an attempt to enable Nanos unikernels to be managed by Ops on non-intel architectures such as the Mac M1 ARM64. Unless ther

Ian Marsman 1 Nov 22, 2021
An little docker container to send an heartbeat to uptime kuma.

Uptime Kuma Push Service This Docker image is for sending a heartbeat to an Uptime Kuma server. Here you will find a little introduction on how to use

J&J Ideenschmiede GmbH 1 Apr 17, 2022
prometheus docker-container-exporter

Start with docker cd /home git clone https://github.com/sanggi-wjg/docker-container-exporter.git docker build -t dc-exporter . docker run -p 9091:90

null 1 Dec 3, 2021
Serve container tar.gz contents for docker

Serve container tar.gz contents for docker

corpix 3 May 22, 2022
Edge Orchestration project is to implement distributed computing between Docker Container enabled devices.

Edge Orchestration Introduction The main purpose of Edge Orchestration project is to implement distributed computing between Docker Container enabled

null 1 Dec 17, 2021
Container actions using Golang Docker SDK

container-go Prototyping continuous integration for microservices using only Gol

null 0 Dec 28, 2021
How to get a Go / Golang app using the Gin web framework running natively on Windows Azure App Service WITHOUT using a Docker container

Go on Azure App Service View the running app -> https://go-azure-appservice.azurewebsites.net ?? This is an example repo of how to get a Go / Golang a

Ed Andersen 4 Jun 24, 2022
Explore Docker registries and manipulate Docker images!

L/S tags Utility and API to manipulate (analyze, synchronize and aggregate) images across different Docker registries. Example invocation $ lstags alp

Ivan Ilves 288 Jun 15, 2022
Docker-based remote code runner / 基于 Docker 的远程代码运行器

Docker-based remote code runner / 基于 Docker 的远程代码运行器

E99p1ant 35 Feb 22, 2022