The last step is to flesh out the run target to use this new container to run the blog. It would be trivial to copy out the code from the container if that was the case. your code-base might be considered sensitive if it has algorithms written in Python in it. This might not be the only sensitive information though, i.e. Ideally if you are following the 12-factor app approach and you don’t have any configuration secrets in your container. When you start copying your code into a container, you might want to reconsider. It is safe to push this to a public Docker repository as there are no sensitive parts to it. #Docker hub netatalk install#& gem install github-pages -no-rdoc -no-riĮNTRYPOINT RUN apt-get install -y ruby2.2 ruby2.2-dev make gcc nodejs zlib1g-dev RUN add-apt-repository -y ppa:brightbox/ruby-ng & apt-get install -y software-properties-common Adding the following to the Makefile target achieves that: Most repos will have a latest tag to use along with versioned ones. To push to the repo, you will need to tag the container. Once we have the container, we want to make it available to use again in future, so I created a repository for it under cobusbernard/jekyll-blog. Step 9/9 : ENTRYPOINT jekyll serve -watch /site Step 8/9 : RUN rm -rf /var/lib/apt/lists/* Step 7/9 : RUN gem install jekyll -no-rdoc -no-ri & gem install github-pages -no-rdoc -no-ri Step 6/9 : RUN apt-get install -y ruby2.2 ruby2.2-dev make gcc nodejs zlib1g-dev Step 3/9 : RUN add-apt-repository -y ppa:brightbox/ruby-ng #Docker hub netatalk update#Step 2/9 : RUN apt-get update & apt-get install -y software-properties-common Sending build context to Docker daemon 8.935 MB Preparing to build version of cobusbernard/jekyll-blog container. To do so, I created the first target as default with a nice little message describing the available targets: I always want some default behaviour in a command that doesn’t break anything and explains what it does when you run it without any parameters. Create and use a container to run the siteįirst hit in Google for getting started with makefiles yielded this site.I have encountered them before, but never created one, so I decided on the following Yaks to shave: While I’m at it, I wanted to use a Makefile. (And convince myself that doing this will make me more efficient and therefore create more blog entries…). Inspired by the DevOpsDays site, I wanted to have my own container to work with when writing blog posts. I have been working with docker a lot at work and while running a 3 node Mesos + Marthon cluster at home (future post +1).
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |