Skip to content

Developing With Docker (Day 1)

TL;DR: Over this series of articles I’m going to try and build up and develop for node.js in a re-usable continer (vm) without polluting my host machine with various versions of node.js, mongodb, etc.

For a while I’ve been using vagrant and chef/puppet to develop in sandboxed environments without pulling dependency hell onto my host computer. In fact my host computers (laptop and desktop) are now pretty vanilla linux mint systems with editors and git installed. I actually version what I have on these boxes using puppet.

However, I have a few problems with vagrant for development. I don’t know if docker will solve these but we’ll see.

  • Host/Guest shared filesystems have lots of permissions issues on linux and even more on windows. The differences between usernames and root/non-root cause real issues when developing code on your host but building / generating on a VM.
  • Guest VM’s use up ram. This isn’t an issue on desktops now a days with > 24gb ram easily accessible. But it’s a big deal on laptops which are still averaging 8gb.
  • Not easy to checkpoint VMs or rebuild from a midway point. I may be missing something here with vagrant, but it’d be nice to have a good known base and restart from there.
  • Have to be online to get updates or build your box.

That said, I really like the reproduceable system/machine configurations that vagrant and chef/puppet allow you to have. I also really like being able to just checkout out a project and “vagrant up”, and have a sandboxed environment ready to go (with some caveats).

Getting Started

You should install the latest docker. Follow the instructions on the site. I’m not going to update this to keep in sync with docker (which is moving quickly).


Coming from vagrant I expected some form of smart configuration file. Docker doesn’t really do that. I was also expecting redo-ability, like you get with puppet or chef. You don’t get that either. What you do get is a very simple command by command syntax which executes line by line. It’ll execute everything in the file every single time the build is run. So hopefully you’re a bashmaster.

Here’s the Dockerfile that I use to create a box with node.js installed on it:

from ubuntu:12.10

# update system and install dependencies

run apt-get update
run apt-get install -y python2.7 python build-essential wget

# get and build node

run cd /tmp && wget
run cd /tmp && tar -xzvf /tmp/node-v0.10.15.tar.gz
run cd /tmp/node-v0.10.15 && ./configure --prefix=/usr && make && make install

So what does this do?

from ubuntu:12.10

This says start with the ubuntu:12.10 base image. This comes from the base docker boxes. For those familiar with vagrant, this is like

run apt-get update

This runs “apt-get update” as root. In fact everything in the Dockerfile is run as root.

run apt-get install -y python2.7 python build-essential wget

This installs python 2.7 (and it’s symlinks), build-essential (make/gcc), and wget (used to pull node)

run cd /tmp && wget

Download node into /tmp

run cd /tmp && tar -xzvf /tmp/node-v0.10.15.tar.gz

Extract node into /tmp

run cd /tmp/node-v0.10.15 && ./configure --prefix=/usr && make && make install

Build and install node.

Building The box container

Now we need to build this machine. You can clone this repository from, or you can just save the Dockerfile into a new directory.

To build we run:

docker build -t u1210_node .

In the directory containing the dockerfile. This will build a new container and if it succededs, it will tag it as u1210_node (so that we can use it later with a “from” directive).

. is actually the path to the directory containing the Dockerfile, so you could run this from anywhere. And containers are referenced by ID/tag not by path so context doesn’t matter at the moment. This will change when we try to share files with the container.

Using The Image

Not that we’ve built the image successfully, we can get a shell into it with

docker -i -t u1210_node /bin/bash

This will launch an interactive terminal (-i) allocating a pseudo tty (-t) with bash as the program (/bin/bash) into the container with the tag u1210_node.

Try it. You can play around all you want.

Next time I’m going to try and work up a Dockerfile iteratively with all the cruft I need to do app development with node.


  1. dialogue about this article here at this website, I have
    read all that, so at this time me also commenting here.|
    I am sure this paragraph has touched all the internet people, its really really pleasant piece of
    writing on building up new web site.|
    Wow, this post is pleasant, my sister is analyzing such things, so I am going to
    convey her.|
    bookmarked!!, I really like your website!|
    Way cool! Some extremely valid points! I appreciate you

    cheap authentic coach purses

    Wednesday, March 26, 2014 at 3:04 pm | Permalink
  2. mobile games wrote:

    My partner and I stumbled over here from a different web address and thought
    I might check things out. I like what I see so i am just following you.
    Look forward to looking over your web page yet again.

    Tuesday, April 15, 2014 at 7:22 am | Permalink
  3. I think this is among the most important info for me. And i am glad reading
    your article. But should remark on some general things,
    The site style is ideal, the articles is really nice : D.

    Good job, cheers

    Monday, April 21, 2014 at 10:38 am | Permalink
  4. Nice blog right here! Also your web site so much up fast!

    What host are you the usage of? Can I get your affiliate hyperlink for your host?
    I desire my website loaded up as quickly as
    yours lol

    Wednesday, April 23, 2014 at 6:39 am | Permalink
  5. You have made some decent points there. I checked on the internet for more info
    about the issue and found most individuals will go along with your views on this site.

    Thursday, May 1, 2014 at 3:24 pm | Permalink
  6. Wonderful article! This is the kind of info that should be
    shared across the web. Shame on Google for no longer positioning
    this post higher! Come on over and discuss with my web site
    . Thank you =)

    Saturday, May 17, 2014 at 9:57 am | Permalink
  7. I’m curious to find out what blog system you are using?
    I’m experiencing some small security problems with my latest website and
    I’d like to find something more risk-free. Do you have any suggestions?

    Sunday, May 18, 2014 at 2:48 am | Permalink
  8. cheap Jets jerseys china Made In usa Outlet Coupon

    Saturday, May 31, 2014 at 3:10 am | Permalink
  9. Heya i’m for the first time here. I came across this board and I find It really useful & it helped me out much.

    I hope to give something back and aid others like you helped me.

    Wednesday, June 4, 2014 at 7:55 am | Permalink
  10. cheap Saints jerseys free shipping for mens kids and womens sale

    Wednesday, June 4, 2014 at 6:51 pm | Permalink
  11. Lynwood wrote:

    Hey there! I know this is kinda off topic but I’d figured I’d ask.
    Would you be interested in exchanging links or maybe
    guest writing a blog post or vice-versa? My blog addresses a lot of the
    same topics as yours and I think we could greatly benefit from each other.
    If you are interested feel free to shoot me an e-mail.

    I look forward to hearing from you! Terrific blog
    by the way!

    Saturday, June 7, 2014 at 5:09 pm | Permalink
  12. download wrote:

    Hello it’s me, I am also visiting this website regularly, this web page is in fact pleasant and the users are genuinely
    sharing pleasant thoughts.

    Tuesday, July 8, 2014 at 5:34 pm | Permalink
  13. I do not even know how I ended up here, but I thought this post was good.
    I do not know who you are but certainly you’re going to a famous blogger if you are not
    already 😉 Cheers!

    Sunday, September 21, 2014 at 3:00 am | Permalink
  14. Actually when someone doesn’t understand after that its up to other visitors that they will help, so here it

    Tuesday, August 4, 2015 at 9:53 pm | Permalink
  15. ため、私はこのサイト上であなたの全体の努力のあなたをお楽しみください。ベティは本当に理由を把握するために、管理の研究とその本当にシンプルが好きです。私たちの数は、ブログを通して有用かつ興味深い両方戦術を与えるだけでなく、強く、この主題に関するいくつかの他の人からの貢献を促すプラス私たちのお気に入りの女の子が実際に多くのものを発見された動的な方法のすべてを聞きます。新しい年の残りの部分を楽しんでいます。あなたはいつも本当に良い仕事を行っています。

    Friday, September 18, 2015 at 3:20 am | Permalink
  16. Bryon wrote:

    What’s up, for all time i used to check web site posts here in the
    early hours in the break of day, because i love to find out more and more.

    Friday, September 25, 2015 at 12:59 am | Permalink
  17. Celinda wrote:

    Very good article! We are linking to this great post on our site.

    Keep uup the great writing.

    Friday, September 25, 2015 at 9:34 pm | Permalink
  18. しかし 別 素晴らしい有益なポスト、私はこれに忠実な読者だブログと私はすることができます」 T応力が十分にどのくらいの データは 私はあなたを読んでから学びました。私は真感謝すべての 機能作業この素晴らしいに入れブログハード。コメント|私はもともと新しい調査はコメントが追加されるたびにadded-チェックボックスと今からあるとき私は-notify私をクリックするとコメントし

    Saturday, October 3, 2015 at 7:48 pm | Permalink
  19. 私はyouveはこの記事を書いに努力していただきありがとうございますことを好むだろう。イムはまた、長い目以内から、全く同じ、非常に最高の仕事を期待して。実際に、本発明の書き込み能力が今私の非常に自身のBlogEngineのブログを開始するために私にインスピレーションを与えてきました。

    Sunday, November 22, 2015 at 4:10 am | Permalink
  20. netflix free wrote:

    It’s very straightforward to find out any topic on web
    as compared to textbooks, as I found this article at this

    Thursday, January 14, 2016 at 3:17 pm | Permalink
  21. Toggle filters will permit you to inlude specific necessary Clash Royale cards to your
    deck ideas. You’re going to wish to include a few of
    the effective Clash Royale cards you found on one of the most Utilized Cards page.

    Monday, July 18, 2016 at 11:41 pm | Permalink
  22. bookstore wrote:

    The number one place to look is community forums because people gather
    within them based on the Law of Attraction of like minded species.

    Great e – Book covers almost always avoid stock images.
    He invites interaction with those who wish to add serious-minded commentary on his
    books, and also those who would like to edit his work on a volunteer basis.

    Wednesday, August 10, 2016 at 12:41 am | Permalink
  23. A new popularr function of the latest OpenOffice version is the sidebar function which permits the launcch of typically utilized OpenOffice tools.

    Thursday, September 29, 2016 at 9:57 am | Permalink
  24. With havin so much content do you ever run into any problems of plagorism or copyright violation? My
    site has a lot of completely unique content I’ve either written myself or outsourced but it seems
    a lot of it is popping it up all over the internet without my authorization. Do you know any methods to help prevent content from being ripped off?
    I’d genuinely appreciate it.

    Monday, December 25, 2017 at 10:47 pm | Permalink
  25. Wonderful goods from you, man. I have remember your stuff prior to and you are just too great. I actually like what you’ve got right here, certainly like what you’re saying and the way during which you are saying it. You’re making it entertaining and you still take care of to stay it sensible. I can not wait to read far more from you. This is really a wonderful site.

    Friday, August 9, 2019 at 9:04 am | Permalink
  26. ศูนย์รักษาผู้มีบุตรยากศูนย์รักษาผู้มีลูกยาก โรงหมอจุฬารัตน์ 11 อินเตอร์

    ศูนย์รักษาผู้มีลูกยาก โรงหมอจุฬารัตน์
    11 อินเตอร์ : Chularat 11 IVF Center ตั้งขึ้นด้วยความมุ่งมั่นที่ช่วยทำให้คู่ชีวิตสามารถเอาชนะปัญหา สาเหตุจากต้นเหตุต่างๆที่มีผลต่อการมีบุตรยาก โดยทีมหมอผู้ชำนาญเฉพาะด้านรักษาการมีลูกยากจากสถาบันที่เป็นที่รู้จักเป็นที่ยอมรับ ผ่านการศึกษาอบรมจากในและต่างชาติ และก็มีประสบการณ์มาเป็นเวลายาวนาน รอให้คำปรึกษาแล้วก็ดูแลคนป่วยอย่างครบวงจร โดยมีวัตถุประสงค์หลักเพื่อการเกื้อกูลสามีภรรยาที่มีปัญหาการมีบุตรยาก ให้สามารถมีลูกได้สมความมุ่งหมาย ด้วยบริการทางเทคโนโลยีช่วยการเจริญพันธุ์ที่มีความล้ำยุครวมทั้งมีมาตรฐานเป็นที่ยอมรับในระดับสากล
    ถ้าคุณสมรสมานานกว่า 1 ปี รวมทั้งมีเพศสัมพันธ์สม่ำเสมอแต่ว่ายังไม่ท้อง หมายความว่าคุณกำลังอยู่ใน “ภาวการณ์การมีลูกยาก” โดยหลักการแล้วแม้ว่าภาวการณ์นี้จะไม่ใช่โรค แม้กระนั้นก็คือปัญหาสำหรับคู่ชีวิตความคาดหวังอยากมีเจ้าตัวน้อย เพื่อความสมบูรณ์แบบของชีวิตครอบครัว การที่คู่สมรสไม่อาจจะมีลูกได้อาจเกิดขึ้นเนื่องจากความผิดแปลกบางอย่างที่ส่งผลต่อภาวการณ์การเจริญพันธุ์ ทำให้ไม่สามารถมีการกำเนิดได้ตามธรรมชาติ โดยอาจมีสาเหตุจากฝ่ายหญิงหรือข้างชาย หรือทั้งสองฝ่าย

    Wednesday, November 13, 2019 at 9:11 pm | Permalink

8 Trackbacks/Pingbacks

  1. prolong gold on Monday, September 8, 2014 at 4:40 pm

    prolong gold

    confabulus › Developing With Docker (Day 1)

  2. moved here on Wednesday, June 3, 2015 at 7:50 pm

    moved here

    confabulus › Developing With Docker (Day 1)

  3. how to revise on Tuesday, October 27, 2015 at 12:43 pm

    how to revise

    confabulus › Developing With Docker (Day 1)

  4. on Thursday, May 12, 2016 at 12:12 pm

    confabulus › Developing With Docker (Day 1)

  5. Coupon Code For Toys R Us Shipping on Wednesday, June 1, 2016 at 4:58 am

    Coupon Code For Toys R Us Shipping

    confabulus › Developing With Docker (Day 1)

  6. visit the next web site on Monday, September 12, 2016 at 4:41 am

    visit the next web site

    confabulus › Developing With Docker (Day 1)

  7. online stores like urban outfitters and modcloth on Wednesday, July 26, 2017 at 3:49 pm

    online stores like urban outfitters and modcloth

    confabulus › Developing With Docker (Day 1)

  8. resep asinan buah on Wednesday, August 9, 2017 at 11:23 am

    resep asinan buah

    confabulus › Developing With Docker (Day 1)

Post a Comment

Your email is never published nor shared.