NewDisplayName Posted April 17, 2019 Share Posted April 17, 2019 (edited) Hey, there... so ive installed PHP with Apache (https://hub.docker.com/_/php/) via php:apache-stretch But my brain does not understand how to use it. Ive exported the conf files to my array: /var/log/apache2 -> /mnt/user/appdata/apache2/log (same for apache conf, and php conf) Thats my start cmd Quote /usr/local/emhttp/plugins/dynamix.docker.manager/scripts/docker run -d --name='php' --net='bridge' --log-opt max-size='10m' --log-opt max-file='3' -e TZ="Europe/Berlin" -e HOST_OS="Unraid" -p '123:80/tcp' -v '/mnt/user/appdata/apache/web':'/var/www/html':'rw' -v '/mnt/user/appdata/apache/php':'/usr/local/php':'rw' -v '/mnt/user/appdata/apache/apache2':'/etc/apache2':'rw' -v '/mnt/user/appdata/apache/logs':'/var/log/apache2':'rw' --restart=unless-stopped -c=128 'php:apache-stretch' Sadly this doesnt work out of the box, so i had to manually copy the files outside and then link it outside. (u know what i mean? :D) If i just link it, the fodlers are empty and the docker cant start up... 1.) Anyway, my biggest problem is: how to enable extentions (like mysql and htaccess) If i ssh into the container and issue "what ever the command was" it installs the extention and it works till next restart, but how to archive this permanent? 2.) What is the correct way to link conf and log files to outside? Why does docker wont install the programm in the linked directory on startup? (thats how it should work if i understand it correct) Edited April 17, 2019 by nuhll Quote Link to comment
Squid Posted April 17, 2019 Share Posted April 17, 2019 4 hours ago, nuhll said: 1.) Anyway, my biggest problem is: how to enable extentions (like mysql and htaccess) 4 hours ago, nuhll said: If i ssh into the container and issue "what ever the command was" it installs the extention and it works till next restart, but how to archive this permanent? The dockerHub page shows you how to install more extensions by changing the dockerfile. Ultimately this means that you'll be building the image locally via docker build command. Quote Link to comment
NewDisplayName Posted April 18, 2019 Author Share Posted April 18, 2019 (edited) Cant this archieved via command? Like via extra Arguments or something like that? If not, how would i change a dockerfile? Edited April 18, 2019 by nuhll Quote Link to comment
saarg Posted April 18, 2019 Share Posted April 18, 2019 Clone the git repo, edit the dockerfile and then run docker build. Quote Link to comment
NewDisplayName Posted April 18, 2019 Author Share Posted April 18, 2019 (edited) 10 hours ago, saarg said: Clone the git repo, edit the dockerfile and then run docker build. How to use this with unraid?! (i know how to clone, then i get the "dockerfile", this i can edit), but how to get this into unraid? Edited April 18, 2019 by nuhll Quote Link to comment
saarg Posted April 19, 2019 Share Posted April 19, 2019 You use the docker image you build in the repository field in the template. Quote Link to comment
NewDisplayName Posted April 19, 2019 Author Share Posted April 19, 2019 (edited) Sorry, do you mean i need to reupload my edited dockerfile and image to docker.com? And then use it in unraid? Edited April 19, 2019 by nuhll Quote Link to comment
saarg Posted April 19, 2019 Share Posted April 19, 2019 You don't have to upload anything. You build the image on unraid with docker build blah blah blah. Docker documentation for information about how to do it. Quote Link to comment
NewDisplayName Posted April 20, 2019 Author Share Posted April 20, 2019 Do you mean i can just ssh into the docker and edit the dockerfile? Quote Link to comment
Squid Posted April 20, 2019 Share Posted April 20, 2019 No. You have to clone the GitHub repo for the container. Then you pull it down onto your server. Then you edit the dockerfile locally. Then you issue an appropriate docker build command on the server. Quote Link to comment
NewDisplayName Posted April 26, 2019 Author Share Posted April 26, 2019 (edited) On 4/20/2019 at 5:11 PM, Squid said: No. You have to clone the GitHub repo for the container. Then you pull it down onto your server. Then you edit the dockerfile locally. Then you issue an appropriate docker build command on the server. You mean i can use the "docker" commands via ssh and it appears then in the browser? But i still dont know what you mean by clone the github repo, wouldnt that mean i dont get new updates? For the container? Is that what you mean? https://docs.docker.com/get-started/part2/ And i can issue these commands via ssh on unraid (i obv dont need to install docker) and unraid will itself figure out to display it in the frontend? I dont want everything "fresh to eat" ill do my research on my own, i just need to know where to start. Overall, if i make this much work, i could also upload it to our appstore, where i can find information on doin so? Edited April 26, 2019 by nuhll Quote Link to comment
Squid Posted April 26, 2019 Share Posted April 26, 2019 And this https://help.github.com/en/articles/cloning-a-repository Quote Link to comment
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.