Coder Social home page Coder Social logo

vzlogger-docker's Introduction

multi arch docker image for vzlogger

This image wraps a vzlogger into a container for platforms

  • linux/amd64
  • linux/arm64
  • linux/arm/v7

usage

The image has its entrypoint set to vzlogger. Just pass any vzlogger command line arguments to the "docker run" command. Bind mount your vzlogger.conf from from the host file system into the container.

Example:

docker run --rm --read-only -v $PWD/vzlogger.conf:/etc/vzlogger.conf:ro -p8080:8080 -t torstend/vzlogger --httpd --httpd-port 8080

As an alternative, use this snipped in your docker-compose.yaml and run "docker-compose run vzlogger"

version: '3.2'
services:
  vzlogger:
    image: torstend/vzlogger:latest
    read_only: true
    command: [ "--httpd", "--httpd-port", "8080" ]
    tty: true
    volumes:
      - ./vzlogger.conf:/etc/vzlogger.conf:ro
    healthcheck:
      test: "curl -f http://localhost:8080/ ||exit 1"
      interval: 10s
      timeout: 10s
      retries: 2
    ports:
      - "8080:8080"

Dockerfile and docker-compose.yaml could be found here: https://github.com/t3r/vzlogger-docker

The images at the docker hub were build with this command

docker buildx build --platform linux/amd64,linux/arm64,linux/arm/v7 -t torstend/vzlogger -t torstend/vzlogger:stretch-0.8.0-git-8d06176 . --push

caveats

Don't daemonize the vzlogger. Make sure you have

"daemon": false

in your vzlogger.conf. Daemonizing the process will stop your container immediately.

vzlogger-docker's People

Contributors

t3r avatar

Stargazers

 avatar  avatar

Watchers

 avatar  avatar

Forkers

benny-git

vzlogger-docker's Issues

docker-compose exits instantly

hi, found your docker image on docker hub and have little problems with it..
here is my docker-compose log:
[Apr 16 05:38:11][main] vzlogger v0.8.0 based on heads/master-0-g8d06176360 from Sat, 18 Jan 2020 09:23:08 +0100 started.
[Apr 16 05:38:11][push] Ignoring push entry due to empty array or duplicate section
[Apr 16 05:38:11][mtr0] Creating new meter with protocol d0.
[Apr 16 05:38:11][d0] pullseq len:5 found
[Apr 16 05:38:11][d0] ackseq len:6 found 050
, 6
[Apr 16 05:38:11][mtr0] Meter configured, enabled.
[Apr 16 05:38:11] New meter initialized (protocol=d0)
[Apr 16 05:38:11] Configure channel.
[Apr 16 05:38:11][chn0] New channel initialized (uuid=... api=volkszaehler id=1-0:1.8.1)
[Apr 16 05:38:11] Have 1 meters.
[Apr 16 05:38:11][main] log level is 15
[Apr 16 05:38:11][main] daemon=1, local=1
[Apr 16 05:38:11] Daemonize process...

After that, container exits instantly. So container is up for 1s and stops.
Do you have any clue whats wrong?

Can't open device /dev/ttyUSB0

I tried getting my USB IR head to work with this container, but ran into issues where it could not open the meter:

[Oct 07 20:59:39][]     ===> Start meters
[Oct 07 20:59:39][sml]  open(/dev/ttyUSB0): Permission denied
[Oct 07 20:59:39][mtr0] Cannot open meter
[Oct 07 20:59:39][]     Startup failed: Meter open failed.

I finally figured out that the user doesn't have the right permissions, as USER nobody is set in the Dockerfile. Is there a specific reason for this? Otherwise please accept my pull request to change this.

Vzlogger Update

I am running this quite long now. When I see the version of Vzlogger, it says vzlogger v0.8.0 based on heads/master-0-g8d06176360 from Sat, 18 Jan 2020 09:23:08 +0100 .

Is there any way to update the vzlogger to latest version.

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.