Re: Docker container added for Roundup

"John P. Rouillard" <[email protected]>
Newsgroups gmane.comp.bug-tracking.roundup.user
Message-ID <[email protected]>
Hi Norbert:

Thanks for trying this out, It's the first time I have ever done
anything with docker/containerization.
 
In message <[email protected]>,
SCHLEMMER Norbert writes:
>How is the valid command to create/install a tracker ?
>roundup-admin -i /usr/src/app/tracker install ...

That's correct. Just like in the installation.txt document. No
difference from a native install.

>do you have an example for the "install" command (classic, mysql, ..) ?
>1) copied https://sourceforge.net/p/roundup/code/ci/default/tarball?path= to docker-roundup

I assume you untarred the file 9-).

>2) built image
>
>docker build -f scripts/Dockerfile -t roundup-app --build-arg="source=pypi" --rm .

Looks good. Note you are using 2.1.0 release from pypi. I assume this
is intentional. If you want to build from the development tarball
code, remove the build-arg option or setting pypi to local will build
from the development code.

Can you try building a development docker and test with it to see if
it behaves differently.

>3) mkdir myTracker

I assume myTracker is owned by uid 1000. If it wasn't the error would
have looked like:

   ...
   PermissionError: [Errno 13] Permission denied: '/usr/src/app/tracker/TEMPLATE-INFO.txt'


>noschvie@steinebrunn:~/docker-roundup$ docker run -it -v $(pwd)/myTracker:/usr/src/app/tracker --entrypoint sh roundup-app:latest
>~ $ roundup-admin -i /usr/src/app/tracker install
>Templates::
>Select template [classic]: classic

This is odd, it looks like you typed classic which should have worked.
Also your Templates:: line should have listed 5 templates like mine
below.

>Select template [classic]:
>Back ends:: anydbm, mysql, sqlite, postgresql
>Select backend [anydbm]: sqlite
>Traceback (most recent call last):
>  File "/usr/local/bin/roundup-admin", line 8, in <module>
>    sys.exit(run())
>  File "/usr/local/lib/python3.10/site-packages/roundup/scripts/roundup_admin.py", line 50, in run
>    sys.exit(tool.main())
>  File "/usr/local/lib/python3.10/site-packages/roundup/admin.py", line 1807, in main
>    ret = self.run_command(args)
>  File "/usr/local/lib/python3.10/site-packages/roundup/admin.py", line 1676, in run_command
>    return self.do_install(self.tracker_home, args)
>  File "/usr/local/lib/python3.10/site-packages/roundup/admin.py", line 437, in do_install
>    template_config = UserConfig(templates[template]['path'] +
>KeyError: 'classic'
>~ $

It looks like the build failed in some weird way.

Sigh I thought dockers were supposed to prevent this sort of stuff 8-).

This is what I get:

=-=-=-=-=-
$ docker run -it -v $PWD/zz:/usr/src/app/tracker --entrypoint sh roundup-multi:newest2
~ $  roundup-admin -i /usr/src/app/tracker install
Templates:: minimal, jinja2, classic, responsive, devel
Select template [classic]:
Back ends:: anydbm, mysql, sqlite, postgresql
Select backend [anydbm]: sqlite

---------------------------------------------------------------------------
 You should now edit the tracker configuration file:
   /usr/src/app/tracker/config.ini
=-=-=-=-=-=- truncated

The docker name is different because my :latest docker was an older
build not using a multi-stage build process.

I don't know what can cause this. The only failures I had with the
dockers was when the myTracker or zz directory was not uid 1000, but
that generated the Permission denied error.

Inside the docker can you check /usr/local/share/roundup/templates

  $ ls
  classic     devel       jinja2      minimal     responsive

should be what you see. If not maybe rebuild the docker (also try the
development build) and see if there is an error?

As I said this is my first docker experience ever. Started Thursday
night. Never had a reason to use it when I was at a job.

I wonder if there is some weirdness with your locale? I notice your
emails use AW: rather than Re:, so I assume you are in a German
speaking locale?

Anybody with docker experience have an idea?

Thanks again Norbert for trying this.

--
				-- rouilj
John Rouillard
===========================================================================
My employers don't acknowledge my existence much less my opinions.
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.