clixon/docker/base
2020-08-18 15:24:50 +00:00
..
Dockerfile docker base use evhtp 2020-08-18 15:24:50 +00:00
Makefile.in docker base use evhtp 2020-08-18 15:24:50 +00:00
README.md docker base use evhtp 2020-08-18 15:24:50 +00: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 cli -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.