How to edit a dockerfile locally


Recommended Posts

I'm wanting to edit a dockerfile that's used to create an image that I'm using.  When you pull an image from the docker repo, does it include the dockerfile?  I'm guessing that in order to build from a dockerfile I need to pull from the user's github first and then build from that source, but I wanted to check on that with the docker power users around here.

Link to comment

I'm wanting to edit a dockerfile that's used to create an image that I'm using.  When you pull an image from the docker repo, does it include the dockerfile?  I'm guessing that in order to build from a dockerfile I need to pull from the user's github first and then build from that source, but I wanted to check on that with the docker power users around here.

 

You have to clone the repository into your server, via git or wget. Then you can edit the Dockerfile as you see fit.

 

The command to build a container is : docker build -t IMAGENAME /path/of/dockerfile/

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.