3

Granted, I'm a complete noob with respect to the following, but I think I'm having trouble finding the answer to this question on my own because of the signal/noise based on the search terms docker image, github, etc.

So, concretely, my question is: can I use my forked version of the Rabbitmq official image's Github repository as the value for my FROM directive?

I've tried specifying every variation of the URL I can think of, but haven't had any luck (errors include Error: image ethagnawl/rabbitmq:latest not found, Error: image ethagnawl/rabbitmq:efb97a5171a3672c0c6f38d9127912d5fe753e27 not found).

pdoherty926
  • 9,895
  • 4
  • 37
  • 68

2 Answers2

2

Not directly.

You can build an image, following a similar Dockerfile as the one used for rabbitmq image: docker-library/rabbitmq/Dockerfile.

In your image, you can tweak the installation to match your need.
You can even call git clone commands in that Dockerfile, should you need a repo content in said image.

Then you can publish your own image on Docker Hub.

VonC
  • 1,262,500
  • 529
  • 4,410
  • 5,250
  • Thanks! I will give this a try. – pdoherty926 Nov 22 '15 at 19:33
  • @pdoherty926 depending on the extent of your modifications, you could directly start `FROM rabbitmq`, and build your new image from the existing one. Or you could, as mentioned in the answer, rebuild everything, with a few modifications. – VonC Nov 22 '15 at 19:34
  • This was actually my original idea, but as I'm having such difficulty making my Rabbit config changes "sticky", I thought it'd be easier to modify the official images bootstrap shell script. I'm going to try using the official image as a base again, as that's much simpler. Your answer is definitely the correct one for the forked image approach, however. Thanks again! – pdoherty926 Nov 22 '15 at 20:36
0

Yes you can, see for example

Clone private git repo with dockerfile

or

https://devops.profitbricks.com/tutorials/configure-a-docker-container-to-automatically-pull-from-github-using-oauth/

Community
  • 1
  • 1
user2915097
  • 30,758
  • 6
  • 57
  • 59
  • Thanks, but this isn't what I'm trying to do. I'm trying to replace `FROM ubuntu` in that Dockerfile with `FROM my-repository`. – pdoherty926 Nov 22 '15 at 19:32