Volmarg/personal-management-system

Not really an issue, docker 2021?

saqeria opened this issue · 10 comments

Hi, I looked into your project and I love the way it works. I tried setting it up in docker but unfortunately without success... I know there are more and more people requesting you to make a docker image. If you could make a docker image out of this project I think you will get a huge increase of people using your project and an increasing amount of attention for it. Do you have any plans for making this project into a docker image in the near-future? Sorry for opening an issue ticket, I just wanted to show you some love for greating such a cool and usefull project! Keep up the good work and please think about creating a docker image ASAP ;)

Thanks in advance.

Hello,

Can You tell me what kind of Problem You got with current docker?
There is some configuration already prepared by one contributor and fixed by other.

So maybe just add some info what kind of error/problems You got?

I'm not really into the docker, but since the configuration is already there and was confirmed that it works (at least with previous versions) then maybe it;s something small that needs to be fixed.

@saqeria

Would You be interested in testing the pull?

It contains changes in hash which should fix the I suspect You got issue with that.

#51

I've tested it on my own, I see where the issue is now - will add myself an todo so that docker can work without the hash check

But I've merged it and it builds the image

Hi @Volmarg sorry for not being very responsive. I was really busy finishing some school projects. I've used docker for quite some time now but I have no clue on how to setup docker using your project.. The documentation on both your own site and in the readme file is not very detailed with regards to docker installations. Could you give me a brief tutorial on how to install the dockerized project? If needed I'll probably be able to make a more detailed tutorial afterwards which you can merge in your readme file for beginners to be able to setup the project successfully.

@saqeria

No problem.

Well my knowledge about the docker is poor. I've managed to test if it's build-able by:
0. Installing:

sudo apt-get install docker
sudo apt-get install docker-compose
  1. Going to the root directory of the project and calling:
sudo docker-compose build
  1. Then I could see the image on the list
sudo docker images

However I have this feeling that in order to make it more automatic this needs to be expanded with call from within the docker itself, like I do this on startup of my RaspberryPi.

/etc/xdg/lxsession/LXDE-pi/autostart # this directory is Explictily on Raspberry only
@sudo screen -dm -S pms-server /etc/startup-scripts/start-pms.sh

cd /var/www/personal-management-system/;
symfony server:start --port=8001;
  1. It might be also required to install the symfony server
https://volmarg.github.io/docs/general/installation#local-server

@saqeria

No problem.

Well my knowledge about the docker is poor. I've managed to test if it's build-able by:
0. Installing:

sudo apt-get install docker
sudo apt-get install docker-compose
1. Going to the root directory of the project and calling:
sudo docker-compose build
1. Then I could see the image on the list
sudo docker images

However I have this feeling that in order to make it more automatic this needs to be expanded with call from within the docker itself, like I do this on startup of my RaspberryPi.

/etc/xdg/lxsession/LXDE-pi/autostart # this directory is Explictily on Raspberry only
@sudo screen -dm -S pms-server /etc/startup-scripts/start-pms.sh

cd /var/www/personal-management-system/;
symfony server:start --port=8001;
1. It might be also required to install the `symfony server`
https://volmarg.github.io/docs/general/installation#local-server

@Volmarg I will try to set it up later this week. The only problem is that I am trying to install it on a synology nas which already has a docker application with GUI. So making the image myself is gonna be a bit of a hassle but I will try to figure it out. Normally the docker image can be directly downloaded and installed but now I probably have to install a dockerized ubuntu first and install it in there. I will keep you updated! If you have any tips for my usage let me know please.

@saqeria

Yeah but seem like some ppl already managed to use that docker image somehow. Got no idea how this works, i can only suspect that it runs through all the comands defined in here

https://github.com/Volmarg/personal-management-system/blob/main/docker/php-fpm/Dockerfile

and build the output image as on first line you can see

FROM php:7.4-fpm

And this points on the

https://github.com/docker-library/php/blob/74175669f4162058e1fb0d2b0cf342e35f9c0804/7.4/buster/fpm/Dockerfile

Which then points on the:

https://hub.docker.com/_/debian

so yeah, this is why it's called compose i guess

@saqeria

Yeah but seem like some ppl already managed to use that docker image somehow. Got no idea how this works, i can only suspect that it runs through all the comands defined in here

https://github.com/Volmarg/personal-management-system/blob/main/docker/php-fpm/Dockerfile

and build the output image as on first line you can see

FROM php:7.4-fpm

And this points on the

https://github.com/docker-library/php/blob/74175669f4162058e1fb0d2b0cf342e35f9c0804/7.4/buster/fpm/Dockerfile

Which then points on the:

https://hub.docker.com/_/debian

so yeah, this is why it's called compose i guess

Hi @Volmarg,
I just tried to install PMS on a ubuntu container on my NAS. When I tried use the "composer install" command in bash it shows the following errors:
`root@ubuntu1:/var/www/html/pms# composer install
Loading composer repositories with package information
Installing dependencies (including require-dev) from lock file
Your requirements could not be resolved to an installable set of packages.

Problem 1
- The requested PHP extension ext-gd * is missing from your system. Install or enable PHP's gd extension.
Problem 2
- Installation request for gumlet/php-image-resize 2.0.0 -> satisfiable by gumlet/php-image-resize[2.0.0].
- gumlet/php-image-resize 2.0.0 requires ext-gd * -> the requested PHP extension gd is missing from your system.
Problem 3
- Installation request for phar-io/manifest 1.0.3 -> satisfiable by phar-io/manifest[1.0.3].
- phar-io/manifest 1.0.3 requires ext-dom * -> the requested PHP extension dom is missing from your system.
Problem 4
- Installation request for phpunit/php-code-coverage 7.0.10 -> satisfiable by phpunit/php-code-coverage[7.0.10].
- phpunit/php-code-coverage 7.0.10 requires ext-dom * -> the requested PHP extension dom is missing from your system.
Problem 5
- Installation request for phpunit/phpunit 8.5.8 -> satisfiable by phpunit/phpunit[8.5.8].
- phpunit/phpunit 8.5.8 requires ext-dom * -> the requested PHP extension dom is missing from your system.
Problem 6
- Installation request for symfony/debug-bundle v5.1.7 -> satisfiable by symfony/debug-bundle[v5.1.7].
- symfony/debug-bundle v5.1.7 requires ext-xml * -> the requested PHP extension xml is missing from your system.
Problem 7
- Installation request for symfony/framework-bundle v5.1.7 -> satisfiable by symfony/framework-bundle[v5.1.7].
- symfony/framework-bundle v5.1.7 requires ext-xml * -> the requested PHP extension xml is missing from your system.
Problem 8
- Installation request for symfony/security-bundle v5.1.7 -> satisfiable by symfony/security-bundle[v5.1.7].
- symfony/security-bundle v5.1.7 requires ext-xml * -> the requested PHP extension xml is missing from your system.
Problem 9
- Installation request for theseer/tokenizer 1.2.0 -> satisfiable by theseer/tokenizer[1.2.0].
- theseer/tokenizer 1.2.0 requires ext-dom * -> the requested PHP extension dom is missing from your system.
Problem 10
- symfony/framework-bundle v5.1.7 requires ext-xml * -> the requested PHP extension xml is missing from your system.
- symfony/maker-bundle v1.22.0 requires symfony/framework-bundle ^3.4|^4.0|^5.0 -> satisfiable by symfony/framework-bundle[v5.1.7].
- Installation request for symfony/maker-bundle v1.22.0 -> satisfiable by symfony/maker-bundle[v1.22.0].

To enable extensions, verify that they are enabled in your .ini files:
- /etc/php/7.4/cli/php.ini
- /etc/php/7.4/cli/conf.d/10-opcache.ini
- /etc/php/7.4/cli/conf.d/10-pdo.ini
- /etc/php/7.4/cli/conf.d/20-calendar.ini
- /etc/php/7.4/cli/conf.d/20-ctype.ini
- /etc/php/7.4/cli/conf.d/20-exif.ini
- /etc/php/7.4/cli/conf.d/20-ffi.ini
- /etc/php/7.4/cli/conf.d/20-fileinfo.ini
- /etc/php/7.4/cli/conf.d/20-ftp.ini
- /etc/php/7.4/cli/conf.d/20-gettext.ini
- /etc/php/7.4/cli/conf.d/20-iconv.ini
- /etc/php/7.4/cli/conf.d/20-json.ini
- /etc/php/7.4/cli/conf.d/20-mbstring.ini
- /etc/php/7.4/cli/conf.d/20-phar.ini
- /etc/php/7.4/cli/conf.d/20-posix.ini
- /etc/php/7.4/cli/conf.d/20-readline.ini
- /etc/php/7.4/cli/conf.d/20-shmop.ini
- /etc/php/7.4/cli/conf.d/20-sockets.ini
- /etc/php/7.4/cli/conf.d/20-sysvmsg.ini
- /etc/php/7.4/cli/conf.d/20-sysvsem.ini
- /etc/php/7.4/cli/conf.d/20-sysvshm.ini
- /etc/php/7.4/cli/conf.d/20-tokenizer.ini
You can also run php --ini inside terminal to see which files are used by PHP in CLI mode.
root@ubuntu1:/var/www/html/pms#
`

Do you know how to bypass these errors?

sudo apt-get install php7.4-gd