# (Superseded) Set up Docker in Virtualbox for 'production' testing

**URL:** https://meta.discourse.org/t/superseded-set-up-docker-in-virtualbox-for-production-testing/12111
**Category:** Development
**Tags:** how-to
**Created:** [January 21, 2014, 11:44pm UTC](https://meta.discourse.org/t/superseded-set-up-docker-in-virtualbox-for-production-testing/12111 "2014-01-21T23:44:33Z")
**Posts on this page:** 12
**Page:** 1

<div class="post-metadata">

### Author: ![riking](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/riking/32/170938_2.png) [@riking](https://meta.discourse.org/u/riking)
#### Post date: [January 21, 2014, 11:44pm UTC](https://meta.discourse.org/t/superseded-set-up-docker-in-virtualbox-for-production-testing/12111/1 "2014-01-21T23:44:34Z")

</div>

> ℹ This document is no longer maintained. See [Contributing to Discourse development](https://meta.discourse.org/t/discourse-development-contributor-guidelines/3823)

Continuing the discussion from [What is “Meta”?](https://meta.discourse.org/t/what-is-meta/5249/4):

> [@What is "Site Feedback"?](https://meta.discourse.org/t/what-is-site-feedback/5249/4):
>
> Also @riking if you want to exercise our install and see if that’s true, please do:
> 
> [https://twitter.com/codinghorror/status/425548537602920448](https://twitter.com/codinghorror/status/425548537602920448)

I think I will, except I’ll use VirtualBox instead of a cloud server. Just to be different than what you suggested :P.

Log:

- Got ubuntu-13-10-server-amd64.iso
- Running install right now [15:44 PST]
- Refusing that silly Ubuntu Landscape™ proposal
- ~~On the “Software Selection” screen, I mark only PostgreSQL database.~~ This is not necessary.
- [15:50 PST] Install is done, I have a user shell.

### Installing Docker

- The first thing it asks me to do, install linux-image-extra, does nothing but set the image to manually installed. This means I’ll have to manually _remove_ it if by any chance I do several kernel upgrades in the future and want to clean out old crap.
- `gpg: "36A1D786925C890F966E92D857A8BA88D21E9 is not a key ID: skipping` well that’s wonderful, I mean, I went to all the trouble of typing it in.
- Aha, if I add the repository to my sources and update, `apt-get` gives me the correct key ID: `because the public key is not available: NO_PUBKEY D8576A8BA88D21E9` (which happens to be the ending part of that long hex string). Running the key fetch-and-add with that shorter hex string ( **D8576A8BA88D21E9** ) works right away.
- Done installing Docker, it’s [16:01 PST].

### Getting the Discourse docker image

- As root, `mkdir /var/docker`, `adduser kane docker`, and `install -g docker -m 2775 -d /var/docker`.
- Start following the Getting Started section
- Git clone fails - git isn’t installed! Heh.
- Hmm, it’s getting permission denied - I’ll just switch into root instead of relying on groups.
- I guess I’ll just put fake info in for the hostname stuff. I do own [riking.org](http://riking.org), but cba to set it up right now
- The **ssh\_key** is important. It’s in the format of the `~/.ssh/id_rsa.pub` file. Surround it in quotes. Example

> ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDSnKNsGL1muizhZ/QN/2xNkIvoeG3AkeWz/0SV/AaVKxnsMvbTHIJXe2vle6lSU/6YRRr/BCsCIrZb4qk0/vlx/p5pJmqhT7Wp8XIYnmBGO5B38PT2aycKoHIWT3Os9ExmyrFfClOrjfcUxzE1pF43myqDD0B7SpmzBWcMLDpl5D2pza4EmsOgF6eB0OGDmM9gBA9wswHa9At2337heZAN/bVRZ49YpAG02gTuQuVdb00ioQpv6rAZUsANiQh0XycqHvE0RBvGlwjfLHGe9GYYPrKLeFPLeKreERbfWnM5PAmexLG0I09WvyY3ChN0X9y6KH5Q1b+vWAMwIV9dyuRZ root@ubuntu

- [16:12 PST] Starting `./launcher bootstrap app`
- [16:22 PST] Bootstrap done, ( **note that it took 10 minutes** ) `./launcher start app` succeeds, a little port forwarding setting in VirtualBox, and:  
 ![](https://global.discourse-cdn.com/meta/original/2X/4/43a386727be7ca2ead9338dd97a43ec0f7dc4931.png)

# Success! 😄

---

<div class="post-metadata">

### Author: ![sam](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/sam/32/102149_2.png) [@sam](https://meta.discourse.org/u/sam)
#### Post date: [January 22, 2014, 12:32am UTC](https://meta.discourse.org/t/superseded-set-up-docker-in-virtualbox-for-production-testing/12111/2 "2014-01-22T00:32:28Z")

</div>

Awesome! What areas of the doco need love?

---

<div class="post-metadata">

### Author: ![riking](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/riking/32/170938_2.png) [@riking](https://meta.discourse.org/u/riking)
#### Post date: [January 22, 2014, 12:47am UTC](https://meta.discourse.org/t/superseded-set-up-docker-in-virtualbox-for-production-testing/12111/3 "2014-01-22T00:47:19Z")

</div>

I’d mention something about the keys problem I had.

Maybe bold the “and re-login” in Before You Start #5.

What format does `ssh_key` need to be in? Might take a lot of typing, cause it’s not the fingerprint.

---

<div class="post-metadata">

### Author: ![codinghorror](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/codinghorror/32/110067_2.png) [@codinghorror](https://meta.discourse.org/u/codinghorror)
#### Post date: [January 22, 2014, 12:48am UTC](https://meta.discourse.org/t/superseded-set-up-docker-in-virtualbox-for-production-testing/12111/4 "2014-01-22T00:48:15Z")

</div>

@sam where is the meta category in the above install? And the “next step for forum admins” topic?

---

<div class="post-metadata">

### Author: ![sam](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/sam/32/102149_2.png) [@sam](https://meta.discourse.org/u/sam)
#### Post date: [January 22, 2014, 12:49am UTC](https://meta.discourse.org/t/superseded-set-up-docker-in-virtualbox-for-production-testing/12111/5 "2014-01-22T00:49:49Z")

</div>

> [@codinghorror](#):
>
> next step for forum admins

looks like a regression, sorting out meta now. going to need copy

---

<div class="post-metadata">

### Author: ![codinghorror](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/codinghorror/32/110067_2.png) [@codinghorror](https://meta.discourse.org/u/codinghorror)
#### Post date: [January 22, 2014, 1:15am UTC](https://meta.discourse.org/t/superseded-set-up-docker-in-virtualbox-for-production-testing/12111/6 "2014-01-22T01:15:10Z")

</div>

- [Admin quick start guide](https://github.com/discourse/discourse/blob/master/docs/ADMIN-QUICK-START-GUIDE.md) (no category)

- Meta category, same as the one here, same category definition

- “What is Meta” topic, meta category, same as the one here

---

<div class="post-metadata">

### Author: ![riking](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/riking/32/170938_2.png) [@riking](https://meta.discourse.org/u/riking)
#### Post date: [January 24, 2014, 8:24am UTC](https://meta.discourse.org/t/superseded-set-up-docker-in-virtualbox-for-production-testing/12111/7 "2014-01-24T08:24:34Z")

</div>

I’m actually loving having the VM set up - whenever I need to test something, the server was savestated with it running, so all I need to do is go to `/admin/docker`, refresh once, hit upgrade, and test it out.

---

<div class="post-metadata">

### Author: ![AdliBazuli](https://avatars.discourse-cdn.com/v4/letter/a/e19b73/32.png) [@AdliBazuli](https://meta.discourse.org/u/AdliBazuli)
#### Post date: [March 31, 2016, 1:17am UTC](https://meta.discourse.org/t/superseded-set-up-docker-in-virtualbox-for-production-testing/12111/8 "2016-03-31T01:17:34Z")

</div>

May I know if this setup using VirtualBox NAT?  
I was setting up discourse using Bridged networking from home and get it up and running, but once I went into office network it is not working anymore.

Trying to switch to NAT and port forwarding guest(80), host(10080) but not successful.

But looks like the registration email went out correctly during the first startup in bridged mode in office network.(I set it up to use office SMTP server at home so the registration email didn’t go though). I want to set this up as a demo to co-workers.Still investigating…

---

<div class="post-metadata">

### Author: ![cpradio](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/cpradio/32/4970_2.png) [@cpradio](https://meta.discourse.org/u/cpradio)
#### Post date: [June 17, 2017, 3:17am UTC](https://meta.discourse.org/t/superseded-set-up-docker-in-virtualbox-for-production-testing/12111/9 "2017-06-17T03:17:29Z")

</div>

Is there a way to use a symlink to install plugins with the Docker Development setup? Or do you have to clone the repo in the plugins folder?

Trying to figure out the best way to do plugin development with this setup (had been using vagrant before).

---

<div class="post-metadata">

### Author: ![merc](https://avatars.discourse-cdn.com/v4/letter/m/f07891/32.png) [@merc](https://meta.discourse.org/u/merc)
#### Post date: [August 2, 2020, 3:06pm UTC](https://meta.discourse.org/t/superseded-set-up-docker-in-virtualbox-for-production-testing/12111/10 "2020-08-02T15:06:16Z")

</div>

Can anyone help me to install Docker with Discourse on Virtualbox on my laptop? I am using Ubuntu? Thank you!

---

<div class="post-metadata">

### Author: ![mcwumbly](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/mcwumbly/32/103861_2.png) [@mcwumbly](https://meta.discourse.org/u/mcwumbly)
#### Post date: [September 23, 2022, 2:13pm UTC](https://meta.discourse.org/t/superseded-set-up-docker-in-virtualbox-for-production-testing/12111/13 "2022-09-23T14:13:25Z")

</div>



---

<div class="post-metadata">

### Author: ![mcwumbly](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/mcwumbly/32/103861_2.png) [@mcwumbly](https://meta.discourse.org/u/mcwumbly)
#### Post date: [September 23, 2022, 2:13pm UTC](https://meta.discourse.org/t/superseded-set-up-docker-in-virtualbox-for-production-testing/12111/14 "2022-09-23T14:13:27Z")

</div>


