Please describe the issue you're having
If you accept the answer, please mark the topic as [SOLVED] by clicking the tick.

Moderators: RussH, cptr13

Forum rules: Just please remember to play nicely once you walk through the door. You can disagree with us, or any other commenters in this forum, but respect our space and keep your comments directed to the topic at hand.
#5108
Hi.

I'm still a relative newcomer to Docker, but I've successfully modified docker-compose files and also created my own Dockerfiles from scratch (using python, flask and WINE to turn a Windows command line app into a web service) so I'm not a complete dunce, but the docker stuff for opencats has me confused and the one Readme just confuses matters even more.

As for PHP, I worked with it quite a lot many years ago, but I've not been near it in years (I'm primarily a C++ programmer), so I I've forgotten much and have no experience of things like php composer.

To start with I just tried running docker-compose with the configuration file in the opencats repository. This went ok, but run into some issues with permissions when ran it, I've attached a screenshot.

So then, having also noticed that the Docker repository image seems to be 2 years old, I thought I'd look at the Dockerfile, update it if necessary and build using the latest Opencats code.

First mystery, the Dockerfile is not in the opencats repository, but the docker-compose.yml is? That really makes very little sense to me, because you seem to be missing out the middle step, Please correct me if I'm wrong, but If I understand correctly from a clone of the opencats repository I can install a non docker build of the latest code, or create a docker container with two year old code, but I can't create a docker container with the latest code?

But anyway I found the php-base repository, which seems to be what I need.

But it makes little sense to me, the readme is completely cryptic as it does not give any indication as to what I'm supposed to do to get it to actually see the opencats repository that I've cloned (i.e. the code I want to actually build an image with), and the Dockerfile and install-composer scripts are completely uncommented.

The last line in the Dockerfile seems to download and expand dockerize, but then does nothing with it?

So, in short, I would really appreciate some help in understanding
a) How to build a Docker image for OpenCATS from a working copy of the repository
b) What's actually going on in the Dockerfile so I can fix it if necessary.

Thanks

Jon
Attachments
Screenshot 2021-08-23 at 02.28.06.png
Screenshot 2021-08-23 at 02.28.06.png (189.46 KiB) Viewed 3363 times
#5109
Ok, so I worked this out for myself and learned a couple of things along the way.

1) It does use the local code if you use the supplied docker-compose file. I was confused because everything I've done with docker so far has involved packaging up all source into the container image itself, whereas this setup points the container to the code and support files which remain outside of the container. So any changes to those files are live.

2) ou need the full zip file from github with the dependencies included (or you can run php composer I belleve but that's a new area to me).

3) It seems that the php-base for the last release (0.9.4) using PHP 5 seems to be incomplete (at least it popped up a number of errors on initializing when I tried it), but that for the latest pre-release (0.9.6) works fine.

4) You'll need to change the permissions on various files and folders to give the container write permission to them, which ones are revealed when you try to initialize.

5) And I don't think this is a docker issue, but rather an oversight in the upgrade to php7. schema.php contains a couple of obsolete mysql calls that need to be replaced with their mysqli equivalents.

At that point everything should work fine.

I hope this helps someone

Discover Women Seeking Casual Encounters Tonight […]

Discover Women Looking for Spontaneous Nights Out[…]

okay - strange as disk is cheap! However if you wa[…]

Can anyone assist me? Much appreciated.