Common Docker Commands

Over the last few months I have used Docker more and more.  Sometime things go my way, sometimes they don’t.  When they don’t, I usually have to Google the command I need to run to get back on track.  I decided to compile a list of common Docker commands to solve various issues I run into when working with Docker.  This list will grow over time.

Run at your own risk.  I am not responsible for blindly copying & pasting without understanding what the implications are.

Show:

Stop:

Delete:

Build:

Publish:

Hosting a Meteor app on Ubuntu using Node, Mongo, and PM2

 

meteor

Recently I had to start hosting a Meteor app on Ubuntu.  The process is pretty straightforward however there are a few gotchas.  This post is really just to help me remember in the future.

First, clone your repo on the target server or move the source files there before you compile/build the app.  This is important if you are using a different OS than what your server is.  I ran into issue when compiling it on OSX and moving it to Ubuntu.

After moving the files, install meteor.

Then compile your app

It will create a archive for you.

Extract it to the directory you will host the app

cd into the server folder

install node modules

install pm2

cd back to the app bundle dir

create a process.json file

add your configuration

create a shell script

add bash script

make it executable

run the bash script

run pm2 startup

this will output a command to run, run it

save current process

All set! Check the status of your app

You should see something similar to this

 

Also, here is a sample nginx site configuration using Let’s Encrypt SSL

 

Connecting Physical to Virtual with my Raspberry Pi

Over the last few weeks I have tinkered with a Raspberry Pi 2 and I have to say it has been pretty fun.  I built my Pi with a Zebra case, 32GB micro sd card, a few heat sinks, and a bread board kit so I can easy connect things to my GPIO.  I also picked up a TP-LINK TL_WN725N USB NIC for WiFi.  I chose this one specifically because it has drivers for both Linux and Windows.

I have gone back-and-forth on which operating system I am going to run on this little device.  I have tested Raspbian and Windows 10 IoT core.  I ended up settling on both.  I have 2 microSD cards, one with Windows 10 IoT core, and one with Raspbian, RetroPie, and OSMC.  I used BootBerry boot loader to install multiple version of Linux on the second microSD card.

So far I am sticking with Windows 10 IoT Core, a few reasons:

  • I am much more proficient at C# than I am python or any other compiled language
  • Windows 10 IoT can run python and even Nodejs if I choose
  • Using Visual Studio to deploy and debug directly to my Raspberry Pi is awesome – I am use to this workflow from developing Windows 8/10 and Windows Phone apps

This isn’t an exhaustive list nor is it meant to help anyone make any decisions on what to use, it is just my preference – for the moment at least. We’ll see how things go.

I am hoping to build an LED panel that I can push messages to over http.  I have made progress over the last 2 weeks.  You can check out some of my code here:

My GitHub Repos

Here are some videos of my progress

 

Turning on a light for the first time

 

Scrolling text on my small LED panel

 

 

Windows 10 Launches Tomorrow. Get It Free Today.

This my Tech PSA for everyone out there not following Windows 10 or tech news in general.  Windows 10 launches tomorrow and if you are running Windows 7 or 8, you get it free. So how do you get it?  Easy.

Look in the system tray for the Windows logo.  For those less tech savvy, that’s the area in the lower right next to the clock.

Click on the Windows logo and follow the prompts to reserve your copy.

Windows 10 should start downloading in the background and as soon as it is released tomorrow you will be able to start the upgrade.

If you’re not sure if Windows 10 is right for you, you can check out all the new features here.  My answer is: If you’re running Windows, yes, you want Windows 10.