Comments inline below

> On 31 Oct 2024, at 22:00, Stephen Finucane <step...@that.guru> wrote:
> 
> On Tue, 2024-10-29 at 19:09 +0000, Herakliusz Lipiec wrote:
>> Add notes on deplotment of Docker image for patchwork testing
>> usnng docker-compose on MacOs. Also adding a note on using
>> TAG variable to alter dockerfile image tag.
>> 
>> Signed-off-by: Herakliusz Lipiec <her...@icloud.com>
>> ---
>> docs/development/installation.rst | 28 ++++++++++++++++++++++++++++
>> 1 file changed, 28 insertions(+)
>> 
>> diff --git a/docs/development/installation.rst 
>> b/docs/development/installation.rst
>> index c33f768..04914f7 100644
>> --- a/docs/development/installation.rst
>> +++ b/docs/development/installation.rst
>> @@ -150,6 +150,34 @@ For more information on Docker itself, please refer to 
>> the `docker`_ and
>> .. _docker-compose: https://docs.docker.com/compose/install/
>> .. _post-install: 
>> https://docs.docker.com/engine/install/linux-postinstall/#manage-docker-as-a-non-root-user
>> 
>> +.. note::
>> +   If you are trying to run patchwork on Mac you need to edit the 
>> Dockerfile located in ``tools/docker``.
>> +   It has been observed that lines that create and switch user to 
>> ``patchwork`` cause problems on MacOS,
>> +   the solution that has been found to be working is to remove/comment 
>> these lines out.
>> +
>> +   If you encounter issues with accesing patchwork files in docker 
>> container after removal of above
>> +   lines, the mounted volume directory can be altered using:
>> +
>> +   .. code-block:: shell
>> +
>> +      $ PATCHWORK_DIR=/Users/<username>/path/to/patchwork docker-compose 
>> build
> 
> Could you give a little more context on this? What kind of issues are you
> seeing? Feel free to open an issue on GitHub and upload screenshots if that
> would help. This is pretty broad guidance and I'd like to confirm it's not a
> single environment issue before we add this to the docs.
To put a little bit of context onto this, I am running this on macOS,  and my 
knowledge
Of docker is that it reuses parts of underlying os if it can, this in turn 
causes errors at
Useradd commands used in dockerfile, because useradd doesnt exist on Mac.
I need to comment out those (which could potentially cause path issues see 
patch 1/2 for explanation).
Regardless, when I try running the dockerfile I get full set of errors related 
to paths,
The first one I get is that directory is not mounted, then I get errors about 
rebuilding the
Docker image because requirement file has changed/does not exists.
The previous patch resolves it neatly (I think), but because it adds the option 
to change the paths,
I think it would be nice to have it documented since it’s added.

It actually took me a while to figure it out so I hope having this mentioned is 
going to save
Some time for anyone else trying to run this on Mac. I have tested this on my 
system multiple times,
And it hasn’t failed me yet.
> 
>> +
>> +.. note::
>> +   If you see an error like the below::
>> +
>> +       => ERROR [web internal] load metadata for 
>> ghcr.io/getpatchwork/pyenv:latest <http://ghcr.io/getpatchwork/pyenv:latest>
>> +       0.9s
>> +       ------
>> +       > [web internal] load metadata for 
>> ghcr.io/getpatchwork/pyenv:latest: 
>> <http://ghcr.io/getpatchwork/pyenv:latest:>
> 
> I'm not able to reproduce this locally (albeit on a Fedora host). Is this 
> still
> the case? I did some work earlier today on the images, so I know for a fact 
> that
> the 'latest' tag definitely exists and is up-to-date.
I have just tested it now and latest tag still gives me an error, while 
stable-3.1 works fine,
It could be some kind of configuration/macOS issue but I dont really feel like 
debugging this,
If changing it to stable-3.1 works fine. I know it’s not a fix just a dirty old 
hack, but it works,
And who knows how long would it take to actually debug this, I did a quick 
google on this and
Couldn’t find anything meaningful, and it is an enhancement and a fix at once 
after all.

Cheers
Hero
> 
> Cheers,
> Stephen
> 
>> +
>> +   It is possible to change the tag used by passing TAG variable when 
>> running docker-compose like:
>> +
>> +   .. code-block:: shell
>> +
>> +       TAG=<tag-to-use> docker-compose build
>> +
>> +   Tags that currently are available for use be found here:
>> +   https://github.com/getpatchwork/pyenv/pkgs/container/pyenv
>> 
>> Manual Installation
>> -------------------

_______________________________________________
Patchwork mailing list
Patchwork@lists.ozlabs.org
https://lists.ozlabs.org/listinfo/patchwork

Reply via email to