Using Docker In Development

I was introduced to Docker by a colleague of mine who attended a presentation about it at Devoxx 2014. I am always curious to try out something new, which is why I started experimenting with it.

Docker is becoming a buzz word, a hype. There are however a lot of articles that show why docker can not be used for production environments. I will not be talking about that, as a developer I use it only in my development environment.

What I will talk about are my experiences I have gather over the course of using it. Note that I am far from an experienced Docker user, nor am I a Docker fanatic. I am a simple developer who has experienced a bit with Docker.

I started to use Docker out of curiosity, just examining what the possibilities are, so I started to use it to run the database the application we develop runs with. There isn’t really any difference with having a database installed locally or using one with Docker, the advantage of Docker however becomes clear when you mess up your database.

It is easy to completely ‘uninstall’ and start over with your database, as you can just start again from the clean image you downloaded from Docker Hub. Another advantage is that it reduces setup time for certain other databases. I remember when I was trying to install Oracle 11g, I didn’t understand anything from it. It was completely different from any other database I ever used.

I failed to setup Oracle 11g locally, and I almost had given up on it until I found it on Docker Hub. Pulling and starting it was easy, most of the setup had already been done, all that was left to do was create a tablespace and I was ready to go.

Docker already saved me a lot of time when it comes to using databases, and having a quick clean install. A minor downside is the size of some of the docker images. The oracle 11g image is over 1GiB, which sounds a lot more than it should be, or ever will be if I would install it locally. It is however the only available Docker image for Oracle 11g, so I’m a bit stuck with it.

Recently I had to use different JMS Brokers, I immediately wanted to install them on Docker because of the advantages of having a quick install ready, and being able to delete it easily if I no longer need them. The only problem with this was that I had to change some configuration files for the brokers. As a beginner I have no idea how to do it, so I ended up installing them locally.

I believe it is possible to do something like that with Docker, but not as easily as running a container and you’re off. Which is a limitation from my point of view. Installing them locally immediately gives me access to all the files I need to modify, without any extra work.

So it turns out that having an application you can just ‘start and go’ is made to be run with Docker. It will save you a lot of setup time, make installing and uninstalling easier and you don’t have to worry if you screw things up. Once you have to mess with data, it seems to be a lot trickier and that big advantages seems to disappear quickly.

I will keep using Docker, and I may even investigate some more on how certain things can be done. As I believe that the more you use it, and the more you know about it, the easier it will become. Enabling to do more advanced things making Docker more convenient and applicable for more than the things I do now.

Advertisements

One thought on “Using Docker In Development

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 )

Google photo

You are commenting using your Google 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 )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.