Giter Club home page Giter Club logo

arch-automated-docker's Introduction

arch-automated-docker

Note: This project is currently not stable

Run docker containers as services.

Install

  1. Extract tar file
  2. run makepkg
  3. Intall via sudo pacman -U arch-automated-docker-git.tar.gz

Configure

Program works by taking configuration from automated-docker.conf and applying them to [email protected] in order to generate a [email protected].

Modifying automated-docker.conf

automated-docker.conf is used to store the command line parameters needed to launch the container. Generally this is found in /etc/automated-docker/automated-docker.conf. Example Entry:

[arch]
-p 555:555
-v ~/stuff:/home/things
base/archlinux

Name of image is within brackets, each additional line should include only one arg value pair, with the last line being the base image.

In this example the image name is arch, has command line options -p 555:555 -v and ~/stuff:/home/things, and uses image base/archlinux in the docker repositories.

Now that the conf file is setup, now it's time to modify the template file.

Modifying service template files

arch-automated-docker takes the .template files, adds the command line arguments and container name from automated-docker.conf, and generates a .service file to be used with systemd. By default automated-docker will create a [email protected] file (usually in /etc/automated-docker/). When start-container reads automated-docker.conf it will search for any template files with the name [email protected], if that is not found then it will use [email protected]. Either way, the script will create a file named [email protected] and place it in the systemd service directory (/etc/systemd/system/ by default). This can then be loaded on startup (sudo systemctl enable [email protected]) and started (sudo systemctl start [email protected]).

The default [email protected] should be fine for most users. Note that the default solution takes advantage of Ibukanov in the thread moby/moby#6791.

Run

Simply issue start-container to create service files for each container listed in automated-docker.conf.

Quick Start

This quick start was written using defaults and Arch Linux. It shows how to create a basic arch linux image that binds port 553 of the host.

  1. Install Using Directions above
  2. Add the following below the comments in /etc/automated-docker/automated-docker.conf
[arch]
-p 553:553
base/archlinux
  1. [Optional] copy the default template file to a new one named [email protected]
cp /etc/automated-docker/[email protected] /etc/automated-docker/[email protected]
  1. Run start-container start-container
  2. Start and enable the service to run at bootup sudo systemctl start [email protected] && sudo systemctl enable [email protected]

arch-automated-docker's People

Watchers

 avatar

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.