-
-
Notifications
You must be signed in to change notification settings - Fork 553
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[WIP] Dockerfile #311
[WIP] Dockerfile #311
Conversation
Thanks for the work so far! You should add the following commands, to create and pre-fill the SQLite database:
This will create the SQLite file, the tables and the user admin/admin |
I thought about that, but that would overwrite the existing database on every container initialisation. Or do you check if a database already exists when running those scripts? |
Referring to my comment #284 (comment) Login would work if a mysql container is run along with this container. |
@dysonspherelab I will test this later today, but I mounted the "data"-directoy from the container and ran the commands mentioned in the readme ( |
@Haidy777 No Kimai doesn't. But why don't you check it in the Dockerfile?
You could do the the same for composer install and check if the @dysonspherelab I don't mind having a second "full-fledged" docker-compose version with MySQL. If you want: go ahead and submit another PR. I am happy to test it! |
@Haidy777 Regarding the 500: probably wrong permission for the directories in |
@kevinpapst I have some devops knowledge, we are running a consulting business on it :) I am not a good php developer, I may need your help to port this app on above base image. |
I' will check that.
Yes, currently it is relatively big, but I'm thinking about starting from another base image (not php:7.2-apache) maybe directly from a php-alpine or maybe directly from apache with php separately installed, as the "raw" php images have almost every module installed as far as I know. |
Thinking about, we can't do that in the Dockerfile, as at the time of the Image-Build there will never be a |
Checked the file permissions and changed them. But I meant 302, sorry for that. Dose kimai write logs somewhere? |
Yes in I don't understand your comment, first you say
and then after having a valid workaround (which btw I have seen multiple times in docker images) you say
Isn't that an opposite opinion? ;-) Also, users might have created the database upfront or imported it from another installation ... then they don't want to have it replaced. If the container boots and doesn't find the file, it will take care of creating it. I don't see the problem here... |
I'm sorry for the confusion. The Dockerfile get's run/built before the container is created, some projects have it automated in Travis. |
Ah, sorry for not being clear enough. Its a bit ago that I created a Dockerfile myself. I checked the docu again and what I actually meant was doing that in anl ENTRYPOINT script: |
Oh, I didn't know about that 😄 I'll test that this evening or tomorrow if I can. |
Sure, I'll leave it as is :) |
This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs. If you use Kimai on a daily basis, please consider donating to support further development of Kimai. |
Description
WIP Version of a Dockerfile for kimai2
As mentioned in #284
Types of changes
Works with php:7.2-apache as base. Maybe there should also be a Dockerfile for people preferring nginx? Also it's rather large (about 650MB currently), but I think this could be optimized.
Currently the login-page shows but you can't login.