Home > Uncategorized > StackDock: $5/month docker instance

StackDock: $5/month docker instance


I came across a ShowHN post on Hacker News about StackDock.

For a long time I’ve been looking for something viable to host a mediawiki instance on for a massive recipe database (for family and friends). I signed up for a free year of the Amazon E3 micro instance, but really never spent anytime dealing with the setup; the year came and went. So, now I’m back trying to hunt down something easy and StackDock is that.

Hosted with Digital Ocean, managed by Copper, for $5/month, you get an instance of a Docker image with access to 1 CPU core, 1GB RAM, and 20GB SSD. That’s right… Copper’s offer is cheaper than DigitalOcean, probably because they buy larger instances and split them up (see this rackspace blog post).

To start, I figured a good test would be to create a StackDock instance of a docker container for bittorrent sync.

Referring to that article, and after some testing, I was able to roll out btsync.

Configure the stackdock instance:
1) docker config file:

RUN apt-get update && apt-get install -y curl
RUN curl -o /usr/bin/btsync.tar.gz http://download-lb.utorrent.com/endpoint/btsync/os/linux-x64/track/stable
RUN cd /usr/bin && tar -xzvf btsync.tar.gz

EXPOSE 55555

2) runtime commands:

btsync --config /home/deploy/btsync.conf

3) On Windows, you can use puttygen to generate a public/private keypair (“OpenSSH for Windows” [isolated cygwin bins] are a bit more complex with permissions).
4) Opening the PPK, you will see the public key near the top (between “Public Lines” and “Private Lines”). You must take this public key, make it into a single line and prepend the string “ssh-rsa”. You can then add it to the stackdock UI when prompted for the public key.
5) Enter credit card info.
6) Click.
7) Flows a little weird so go back to Decks tab, click lightning bolt. This is a beta: if errors are logged “Distilling deck…” will stay up. And… if errors aren’t logged “Distilling deck…” will stay up.
8) Reload the page. If there were errors, the Deck will still be listed, click the lightning bolt again, and you will see the errors of your ways. If there were no errors…
9) Click the Drops tab.
10) Click the + symbol.
11) Specify a domain name. (example: “btsync”)
12) Start instance and click “Show Details.” Note the “ALL PORTS” field, specifically the “22”=>”NNNNN”. NNNNN is the tcp port where `sshd` is bound.
13) Open PuTTY and configure with the following:
Hostname: deploy@docker3.stackdock.com
Port: NNNNN [from ALL PORTS]
Left pane\Connection\SSH\Auth\ Private key for authentication: select the PPK you generated with puttygen earlier.
14) You are now connected.

Configure btsync:
There are some final things to do to configure your btsync instance that are covered in both the original btsync docker post (under the “Configure BitTorrent Sync” section) and in the btsync documentation.
1) Create the file stores:

mkdir ~/.sync
mkdir ~/syncshare

2) Generate a secret for the syncshare:

btsync --generate-secret
#note this string

3) Generate a sample config for your to edit:

btsync --dump-sample-config > ~/btsync.conf

4) Edit the config:

vi ~/btsync.conf
#change the following values:
# device_name: meaningful name
# listening_port: 55555
# storage_path: /home/deploy/.sync
# login: login for web UI, change this from admin
# password: password for login for web UI, change this from password
# shared folder\secret: the secret you generated earlier
# shared folder\dir: /home/deploy/syncshare

5) In your web browser, access: http://docker3.stackdock.com:NNNNN where NNNNN is ALL PORTS 8888=>NNNNN. Enter the login and password as configured in your btsync.conf.

Coming up: bip, Dionaea, and finally mediawiki dockerfiles.

After spinning up a btsync and bip, I quickly realized that the inability to control directly which ports I can bind to will be ineffective for my purposes. It would be perfectly fine if I was going to need hosting for some backend stuff, but as it is now, I really am aiming for full control, at the least port 443 and port 80 for ease of use. I’ll be closing my stackdock account and moving to a DigitalOcean instance. We’ll see how that goes.

  1. No comments yet.
  1. No trackbacks yet.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: