Using Docker at Work for Local Development

At the company I work for we wanted to setup Docker so local developers do not have to do all this work to get their machines configured for any projects. We also wanted to get away from have documentation for different developer laptops. We use Macs, Linux, and Windows machines. So now I have decided to go down the path of learning how to set this up and get this working for everyone.

Before I started learning, what I thought what we were eventually going to get is, one set of files that would work no matter what operating system our devs were using. So then I started research about Docker. I started by going through Docker’s documentation. I took a course in Pluralsight about it. Then I started searching YouTube for Docker talks to get me in understanding the basics. I still have way more things to learn but I feel like I am going down the right path.

So now I was ready to figure out what I needed Docker to do for us. I know that I need 2 services. One service was for EmberJS and the other service is for our web server Nginx. So I started by creating a Dockerfile for the Ember service.

FROM node:8.11.1-alpine
LABEL maintainer="John"


RUN apk add --no-cache \
  git && \
  yarn global add ember-cli@$EMBER_VERSION bower@latest && \
  mkdir -p $APP_DIR && \
  cd $APP_DIR

COPY ./docker/ /

EXPOSE 4200 7357 8080 9222 7020

CMD ["/"]

This will create a NodeJS image that has bower, yarn, and EmberJS. Now we are ready to build our docker-compose.yml file.

version: '3'


    build: .
    container_name: ember-app
      - 7357:7357
      - 4200:4200
      - 9222:9222
      - 49152:49152
      - .:/myapp
      - ember-bower_components:/myapp/bower_components
      - ember-node_modules:/myapp/node_modules
      - ./docker/
      - /myapp/tmp
      - API_HOST=http://someapi
      - API_KEY=sdfdfdsfdsfdsfsdfsdfsdf
    command: ["sh", "/"]
    image: nginx:1.12.1-alpine
    container_name: nginx-app
      - 8081:8080
      - ember
      - ./docker/default.template:/etc/nginx/conf.d/default.template
      - ./dist:/usr/share/nginx/html:delegated
      - SERVER_NAME=localhost
    command: /bin/sh -c "envsubst < /etc/nginx/conf.d/default.template > /etc/nginx/conf.d/default.conf && nginx -g 'daemon off;'"

So this got the Mac and Windows guys working. They can run docker-compose up and get working on the code. If they needed to create a new component they just ran something like docker exec -it ember-app ember g component my-component. They continued to work just fine. So then I went fired up my Solus Linux and started it up. It worked just fine. So now I wanted to create a new component to test that out and it generated it. But when I opened the component and made some changes and hit save, I got a permission error.

So this is where I end this first part of the journey. Its now off to go figure a solution that will fix the Linux side, but also not break the Windows and Mac guys. So make sure to check back for part 2 that will talk about the solution I found. Any questions or comments, please leave a comment

Image of how my Neovim looks like

My Switch to Neovim

For the longest time I have been hopping from editor to editor. I have used Notepad++, Sublime Text, Atom, and recently Visual Studio Code. I have known so many people who keep telling me to try and use Vim. They say you will love it. So, for the past 6 months I have been using Neovim. It has been a long challenge to not go back, but it is growing on me as an editor. Now I am not here to tell you that Vim is better than any other editor. I am not here to tell you that you should use it. I want to tell you why I enjoy using it and then you can make your own decision.


So the hardest part for me in using vim/neovim was learning the keyboard shortcuts. If you are not a keyboard shortcut person, then using Vim is out of the question. I like to use them but never train myself in them so this is one of the first things I had to do. I had to start memorizing them. The problem I ran into was there was just way too many. Then a friend of mine told me that instead of just opening a help document and learning them all, he told me to learn a new command a week. He told me that when I find a new command to learn, write it on a sticky note and put it on my monitor. So that is what I did, I found that I was hitting w or e to get to the beginning or ending of a line. So the first command set that I need helping getting into muscle memory was Shift+I and Shift+A.

So as I was watching others on YouTube and reading articles, they recommend learning h,j,k,land to do so they recommended, So I did that and learned to become a master of those keys. Man did that save my fingers so much. So then I had to train myself to not use the arrow keys to move. To do this, in my vimrc I put in a snippet to echo “Stop being stupid!”, thanks Nick Nisi.

The other big mistake I made when I first started to learn vim, was to use someone elses vimrc verbatim. You should never ever do this, ever. You should start off with an empty or bare essential vimrc. Then when things are not what you need it to be, then add it to your vimrc. When I first started I did this and man it made things so confusing. Half of the plugins, I never used, others caused weird behavior that I was not expecting. So after awhile. So soon I ended up with my Neovim/vim look like this:

Image of how my Neovim looks like

So if you want to look over my vimrc, you may do so but remember, don’t just copy it and use it as your own as it may not be what you need. Take pieces of it. Any questions, please comment below and I will try to answer them


Setting up a new computer can be a tedious and tiresome process. I am not the person that has an exact image of my machine, so when things go wrong I just load that image. I would never have something like that because when I am ready to re-install, I want to start as clean as possible.

At some point I went ahead and starting backing up my dotfiles in Github. This starting to make things easier but it was still a problem. I still had to install all the apps I needed to do things. Then the problem was, what and how do I install these things again. So then I watched a video by another developer by the name of Nick Nisi. He built a script to not only get his dotfiles but also it started moving things to where they need to be. Take a look at the video below where I talk a little more about this topic. You can view my current dotfiles here.


As an automation developer, I have learned how to write code in Java. When I am having an issue, one of the nice things that you can do is debug your code, line by line. For the longest I had wished that something like this existed in PHP. I have come to find out that you can actually debug code, like I do in Java. This is such a helpful task because I do not have to waste time using var_dump and such on variables or results. In your apache/php server you need to install and or enable something called Xdebug . I will work on a tutorial on how to use xdebug while writing code in Sublime Text 2. So keep an eye out on my blog and or YouTube channel for this tutorial.

Terminal IDE for Android

I just purchased a Samsung Galaxy Tab 2 10.1 and I am loving it. So since I am new I have been looking around for some good apps to use. I think I found one in an app called Terminal IDE . This application brings a developmenting environment with Git support that I can do some web development work with it. I am not going to say I can replace my desktop or a laptop, but you can do some quick fixes with it. A good accessory to get with it is the Logitech bluetooth keyboard . You will have to let me know in the comments below on what you think about this nice application.


Web Development on Android

One of my latest purchases was an Android Samsung Galaxy Tablet 10.1. Unfortunately I have to get a replacement but it happens. So getting back on track I am new to an Android device. I found a great app on the Google Play Store, called Terminal IDE . This app brings you access to the terminal and you have some nice commands to work with. A few to name is, Git, VIM, find, etc… Once I get my tablet back I will do a video demo to show it off.