Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unhandled error from config file #5

Open
mirceaciu opened this issue Mar 3, 2019 · 3 comments
Open

Unhandled error from config file #5

mirceaciu opened this issue Mar 3, 2019 · 3 comments
Assignees
Labels

Comments

@mirceaciu
Copy link

Any idea why it outputs this Unhandled line in config file: access.whitelist /etc/opentracker/whitelist.txt when after editing the conf file?

I've downloaded the git repo and uncommented the 37 line of the conf file access.whitelist /etc/opentracker/whitelist.txt.
The image built without any issues but when I run it outputs that text. Container remains active, the file is present (checked with exec -it <cont> sh)

@Lednerb
Copy link
Owner

Lednerb commented Mar 4, 2019

It seems that I've made a mistake when creating this project.

To enable the blacklist or whitelist functionality the opentracker has to be build with modifications in the Makefile of the original project.

Therefore we must edit the Dockerfile beginning from L21:

&& git clone git://erdgeist.org/opentracker \
    && cd opentracker \
    && sed -i 's/#FEATURES+=-DWANT_ACCESSLIST_WHITE/FEATURES+=-DWANT_ACCESSLIST_WHITE/' Makefile \
    && make \

This will enable the whitelist functionality.

If you want to use the blacklist approach, you have to use following:

&& git clone git://erdgeist.org/opentracker \
    && cd opentracker \
    && sed -i 's/#FEATURES+=-DWANT_ACCESSLIST_BLACK/FEATURES+=-DWANT_ACCESSLIST_BLACK/' Makefile \
    && make \

Maybe I should restructure this project to use docker-compose with the services opentracker, opentracker_whitelist and opentracker_blacklist for ease of use.

Also I should reference the original codebase from erdgeist.org as a git submodule and trigger a travis build for the images to be build.

BTW: I'm open for PRs ;)

@Lednerb Lednerb self-assigned this Mar 4, 2019
@Lednerb Lednerb added the bug label Mar 4, 2019
@mirceaciu
Copy link
Author

I use this in my docker-compose.yml

  tracker:
    build:
      dockerfile: compose/opentracker/Dockerfile
      context: .
    ports:
      - 6969:6969
      - 6969:6969/udp
    volumes:
      - ~/api_file_server/opentracker:/etc/opentracker
    hostname: tracker
    container_name: tracker

And the Dockerfile now looks like this:

FROM alpine

WORKDIR /tmp

# All-in-One RUN for a very small image size (< 5 MB)
RUN apk add --no-cache \
	gcc \
	g++ \
	make \
	git \
	cvs \
	zlib-dev \
	&& cvs -d :pserver:[email protected]:/cvs -z9 co libowfat \
	&& cd libowfat \
	&& make \
	&& cd ../ \
	&& git clone git://erdgeist.org/opentracker \
		&& cd opentracker \
		&& sed -i 's/#FEATURES+=-DWANT_ACCESSLIST_WHITE/FEATURES+=-DWANT_ACCESSLIST_WHITE/' Makefile \
		&& make \
	&& mv /tmp/opentracker/opentracker /bin/ \
	&& apk del gcc g++ make git cvs zlib-dev \
	&& rm -rf /var/cache/apk/* /tmp/* 

COPY ./compose/opentracker/opentracker.conf /etc/opentracker/opentracker.conf
COPY ./compose/opentracker/whitelist.txt /etc/opentracker/whitelist.txt

EXPOSE 6969

CMD opentracker -f /etc/opentracker/opentracker.conf

I removed some of the whitespaces as docker would complain about them.
I just built a new image, thanks for the reply.

p.s. I don't know much about the make process but I had to remove the space from +=- DWANT_AC to make it work.
p.p.s maybe I will do a PR :D

@Lednerb
Copy link
Owner

Lednerb commented Mar 5, 2019

Thank you for your contribution! 👍

The spaces were copy&paste errors, sorry for that. Fixed it in the original comment, too.


p.p.s maybe I will do a PR :D

That woulf be great!

@Lednerb Lednerb assigned mirceaciu and unassigned Lednerb Jun 6, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants