giandonatoinverso / PHP-Dynamic-Qr-code

PHP Dynamic Qr code is a script that allows the generation and saving of dynamic and static QR codes
MIT License
244 stars 73 forks source link

Error installing on Docker [ERROR [21/21] RUN groupadd -g appuser] #48

Closed 0x7c0sys closed 9 months ago

0x7c0sys commented 1 year ago

Hello, I'm trying to install this on a Ubuntu 22.04 server VM with docker, everything is up to date, After I make a folder, clone the repo, edit the docker-compose.yml file to change the port and fired up docker compuse up -d , I get this message:

mRemoteNG_TM3XFSqcxh

giandonatoinverso commented 1 year ago

@0xRenegade could you find a solution to the problem?

0xRenegade commented 1 year ago

Hello, I'm trying to install this on a Ubuntu 22.04 server VM with docker, everything is up to date, After I make a folder, clone the repo, edit the docker-compose.yml file to change the port and fired up docker compuse up -d , I get this message:

mRemoteNG_TM3XFSqcxh

Hi. Did you follow the instructions on the README for specifying the user and group in the build options?

https://github.com/giandonatoinverso/PHP-Dynamic-Qr-code/tree/master/docker#readme

0x7c0sys commented 1 year ago

Hello, I'm trying to install this on a Ubuntu 22.04 server VM with docker, everything is up to date, After I make a folder, clone the repo, edit the docker-compose.yml file to change the port and fired up docker compuse up -d , I get this message: mRemoteNG_TM3XFSqcxh

Hi. Did you follow the instructions on the README for specifying the user and group in the build options?

https://github.com/giandonatoinverso/PHP-Dynamic-Qr-code/tree/master/docker#readme

I did read it, and looked information about it but I'm not sure I can do it the right way. Can you give me a hand with it?

0xRenegade commented 1 year ago

The readme describes it just as you need it to be: the error is happening because PGID and PUID aren't defined, which you need to pass them in as arguments when running the build command. For example, PUID=1000 PGID=1000 would probably work just fine.

On Fri, Oct 28, 2022 at 10:12 PM 0x7c0sys @.***> wrote:

Hello, I'm trying to install this on a Ubuntu 22.04 server VM with docker, everything is up to date, After I make a folder, clone the repo, edit the docker-compose.yml file to change the port and fired up docker compuse up -d , I get this message: [image: mRemoteNG_TM3XFSqcxh] https://user-images.githubusercontent.com/67028277/197859730-2594d110-59fc-4c51-bcd8-83e6e1c50240.png

Hi. Did you follow the instructions on the README for specifying the user and group in the build options?

https://github.com/giandonatoinverso/PHP-Dynamic-Qr-code/tree/master/docker#readme

I did read it, and looked information about it but I'm not sure I can do it the right way. Can you give me a hand with it?

— Reply to this email directly, view it on GitHub https://github.com/giandonatoinverso/PHP-Dynamic-Qr-code/issues/48#issuecomment-1295703906, or unsubscribe https://github.com/notifications/unsubscribe-auth/ANWDOB3UBLKNQLYYAE6YOBDWFSI2NANCNFSM6AAAAAAROINQBE . You are receiving this because you were mentioned.Message ID: @.***>

0x7c0sys commented 1 year ago

The readme describes it just as you need it to be: the error is happening because PGID and PUID aren't defined, which you need to pass them in as arguments when running the build command. For example, PUID=1000 PGID=1000 would probably work just fine. On Fri, Oct 28, 2022 at 10:12 PM 0x7c0sys @.> wrote: Hello, I'm trying to install this on a Ubuntu 22.04 server VM with docker, everything is up to date, After I make a folder, clone the repo, edit the docker-compose.yml file to change the port and fired up docker compuse up -d , I get this message: [image: mRemoteNG_TM3XFSqcxh] https://user-images.githubusercontent.com/67028277/197859730-2594d110-59fc-4c51-bcd8-83e6e1c50240.png Hi. Did you follow the instructions on the README for specifying the user and group in the build options? https://github.com/giandonatoinverso/PHP-Dynamic-Qr-code/tree/master/docker#readme I did read it, and looked information about it but I'm not sure I can do it the right way. Can you give me a hand with it? — Reply to this email directly, view it on GitHub <#48 (comment)>, or unsubscribe https://github.com/notifications/unsubscribe-auth/ANWDOB3UBLKNQLYYAE6YOBDWFSI2NANCNFSM6AAAAAAROINQBE . You are receiving this because you were mentioned.Message ID: @.>

Thanks for your reply, I re-did everytihing again as follows: Cloned the repo, cd into the repo folder and inside of that folder, then mkdir -p ./data/mariadb ./data/app/config ./data/app/saved_qrcode, then sudo PUID="$(id -u)" PGID="$(id -g)" docker-compose up --build -d everything went OK then PUID="1000" PGID="1000" docker-compose up --build -d and it went OK

Only thing I had to do was type sudo before building the image and using docker-compose up, didn't need to edit the docker-compose.yml to add the PGID or PUID, I assume that was OK too.

But now when I try to access from locally, say 192.168.0.78:8080/install I get this Forbidden You don't have permission to access this resource. Apache/2.4.38 (Debian) Server at 192.168.0.78 Port 8080 If I type 192.168.0.78:8080/install/setup.php like the documentation says I just get a blank page.

edit: @0xRenegade forgot to reply

0xRenegade commented 1 year ago

You mentioned you're running the docker commands inside a VM on your local machine? Placing it inside a VM would probably make the docker network stuff more confusing, which I couldn't really help you with (I'm not an expert, I just read guides lol).

0x7c0sys commented 1 year ago

You mentioned you're running the docker commands inside a VM on your local machine? Placing it inside a VM would probably make the docker network stuff more confusing, which I couldn't really help you with (I'm not an expert, I just read guides lol).

Hey man thanks for your reply. That shouldn't be an issue, I host a few services from another machine with Docker.
What's odd is that I don't see any Apache server installed in Docker, just the mariaDB.

How did you install it, with or without docker?

0xRenegade commented 1 year ago

You mentioned you're running the docker commands inside a VM on your local machine? Placing it inside a VM would probably make the docker network stuff more confusing, which I couldn't really help you with (I'm not an expert, I just read guides lol).

Hey man thanks for your reply. That shouldn't be an issue, I host a few services from another machine with Docker. What's odd is that I don't see any Apache server installed in Docker, just the mariaDB.

How did you install it, with or without docker?

You'll find the webserver is inside the 'qrcode' container, while the database is inside the 'mariadb' container.

This can be referenced via docker-compose.yml - https://github.com/giandonatoinverso/PHP-Dynamic-Qr-code/blob/master/docker/docker-compose.yml

nbrgit commented 1 year ago

Hey, I get the same error with user Permission is there any solution? Thanks a lot!

giandonatoinverso commented 9 months ago

just released 2.0 version