Git Product home page Git Product logo

containerception's Introduction

containerception

A reference implementation of a self-referential joke.

Because of reasons I wanted to toy with the following parts:

So in a sense it was an obvious thing for me to put these three things together in a container. Besides being an interesting thing to play with I'm not certain if this is useful at all.

Handing the docker socket to the container breaks isolation and you need docker outside of the container to run it in the first place. You could, however still use the resulting image as the basis for a container that manages other containers by the means of docker and docker-compose in a spirit similar to what skydock does.

Using containerception:

  • Adjust the IMAGES environment variable to contain a space separated list of base images
  • Adjust the SLEEPTIME environment variable to contain a time parameter for the sleep command.
  • Mount a folder with a docker-compose.yml to /dockerception
  • Give the container access to the docker socket /var/run/docker.sock.

An example execution of runjak/containerception may look like this:

docker run \
  -e IMAGES="alpine:latest debian:sid" \
  -e SLEEPTIME="1d" \
  -v /var/run/docker.sock:/var/run/docker.sock \
  -v `pwd`:/containerception \
  -d runjak/containerception

Remarks:

Sadly runjak/containerception cannot restart itself because docker-compose up -d kills the old container before a new one is up. It appears that this would need the help of a second instance of runjak/containerception.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.