Jump to content

Making Changes to Docker File or Making My Own


jhugh

Recommended Posts

There's a docker file I use (php:apache), but after installing it I needed to make some changes via command line such as installing software like imagemagick and installing php extensions like mysqli and pdo.

Each time I update the docker I also find myself having to rerun these commands.

I'm wondering if its possible to make my own docker that builds off of another one, but makes my changes to it too. If so, how would I go about making this? And is it possible to make it in a way where I can use it make docker containers on other unraid servers for myself or share it publicly?

Link to comment
16 hours ago, jhugh said:

There's a docker file I use (php:apache)

Do you mean container? Or are you actually building something form a Dockerfile?

 

16 hours ago, jhugh said:

I'm wondering if its possible to make my own docker that builds off of another one, but makes my changes to it too. If so, how would I go about making this? And is it possible to make it in a way where I can use it make docker containers on other unraid servers for myself or share it publicly?

Yes there are several ways.

 

The most robust would be to write a Dockerfile that uses the php:apache as a base image, write your changes into the file, then build and deploy it to dockerhub. Best to looks up some docker tutorials on google to get an idea of how to do that. There is also an option of committing the changes you have made to a live container and pushing those to github but that is not so easy to maintain. Either way you will be dealing with the docker engine on the command line, as there are no unRAID specific tools for this. Best advice is to read up on docker. 

Link to comment

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.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...