clixon/docker/base
Olof hagsand 3d5abb77f9 * Backend daemon drops privileges after initialization (to not run as root)
* New config option `CLICON_USER` with default value `clicon`
  * Can also be set with `-U <user>` clixon_backend command-line option
2019-09-11 21:24:14 +02:00
..
Dockerfile * Backend daemon drops privileges after initialization (to not run as root) 2019-09-11 21:24:14 +02:00
Makefile.in * Ensured you can add multiple callbacks for any RPC, including basic ones. 2019-03-10 17:27:52 +01:00
README.md documentation 2019-09-01 19:45:54 +02:00
start.sh * Changed base OS in clixon-system container to Alpine 2019-02-16 17:45:39 +01:00

Clixon base docker image

This directory contains code for building and pushing the clixon base docker container. By default it is pushed to docker hub clixon/clixon, but you can change the IMAGE in Makefile.in and push it to another name.

The clixon docker base image can be used to build clixon applications. It has the whole code for a clixon release which it downloads from git.

See clixon-system for a more complete clixon image.

Build and push

Perform the build by make docker. This copies the latest committed clixon code into the container.

You may also do make push if you want to push the image, but you may then consider changing the image name (in the makefile:s).

(You may have to login for push with sudo docker login -u )

Example run

The base container is a minimal and primitive example. Look at the clixon-system for a more stream-lined application.

The following shows a simple example of how to run the example application. First, the container is started with the backend running:

  $ sudo docker run --rm --name hello -d clixon/clixon clixon_backend -Fs init

Then a CLI is started, and finally the container is removed:

  $ sudo docker exec -it hello clixon_cli
  cli> set ?
   hello                 
  cli> set hello world 
  cli> show configuration 
  hello world;
  > q
  $ sudo docker kill hello

Note that the clixon example application is a special case since the example is already a part of the installation. If you want to add your own application, such as plugins, cli syntax files, yang models, etc, you need to extend the base container with your own additions.