avatarJustin James

☰ MENU
A web developer and speaker from Arizona

Docker - Running Container As a Service


Posted In: docker

In the previous tutorial we learned how to mount additional directories within the Docker containers. In this tutorial we are going to learn how to run a Docker container as a service a.k.a daemon for nginx and mysql.

To run a Docker container as a daemon, we run it with the -d flag. This will tell Docker to start up the container in the background and return back to the command prompt.

Time to Read: 6 mins

Docker - Mounting Windows Directories in Containers


Posted In: docker

In the previous Docker tutorial we learned how to install Docker and get our first container running. In this tutorial we are going to learn how to mount additional directories within our Docker container that are outside of the c:\Users directory. By default, Docker only mounts the Users folder (c:\Users) inside the docker machine and containers. For myself, I have all of my project files two places: c:\projects and c:\personal. I didn’t want to change my standard configuration just for Docker. Luckily, it is really easy to mount additional directories.

To mount additional directories, you need to add the directory as a shared folder within Virtualbox and then enable long file paths and symlinks. Once the Virtualbox shared folders are setup, you need to mount the directories within the docker machine so that they are available to the containers.

Time to Read: 10 mins

Docker - Getting Started On Windows


Posted In: docker

After seeing a Docker presentation recently I decided to finally figure out how to get Docker working correctly on Windows. Luckily it worked out of the box fairly well but I did run into issues with Windows file path lengths and proxy issues. This series of article will documented how I got Docker working and overcame those issues.

To get started, you will need the docker toolkit. I followed the instructions on the Docker website to get the Docker Toolkit with Virtualbox installed. The instructions for Windows are at https://docs.docker.com/windows/. The instructions also have links to the Linux and Mac instructions. As I am a Windows user, I can only verify that this tutorial all worked under Windows.

Once you get the Docker toolkit installed you are probably wondering now what do I do. On the desktop, it installed a shortcut to the “Docker Quickstart Terminal”. This terminal will ensure that you have the base image that Docker uses for Virtualbox on Windows and you can run all of the Docker commands from this terminal.

Lets take a look at a few examples to get us started.

Time to Read: 9 mins

Jekyll Tip: Showing Liquid Code in Code Snippets


Posted In: blogging and jekyll

There are times when you need to be able to output code snippets that contain what jekyll thinks is liquid code or the jekyll templating language. This especially happens when you are doing Angular tutorial since {{ }} is how you output properties to the UI.

Instead, to include liquid markup in the code snippet you need to surround the code snippet with the raw and endraw tags like so

Time to Read: 2 mins

Jekyll Tip: Adding Styling To Html Output


Posted In: blogging and jekyll

As I was writing some tutorials recently I wanted to be able to style the html elements that Jekyll outputs with different css classes without having to write the actually html in the markdown.

For example I wanted to use a blockquote for items to be aware of that has a blue highlight as well as warnings to watch out for that has a red highlight. Here is the output of the blockquote with the different styles.

This is a normal blockquote. Without doing anything extra in markdown this is my default blockquote.

This is a warning blockquote.

With the kramdown markdown parser that Jekyll uses you can easily add these css classes without having to write out the html code.

Time to Read: 4 mins