Diving Into Docker
I often feel I am the type of developer who enjoys exploring lots of different technologies tangentially related to my work and the development side. I often feel the need to know how everything works and that is why working in software development is quite interesting as it is pretty easy to pick up different tools and play with them, Docker and Jenkins are the new ones I have been looking into. Although I find the dev-ops side quite interesting I am generally more frustrated by it than actually end up enjoying it. Don't get me wrong I love the elegance of continuous deployment and integration, I am very much allured by the idea of creating something that is put together in such as way to allow for new builds to be tested, built and deployed at anytime and with zero downtime, it is indeed something I hope to move towards with my own sites this year. Why Docker ---------- Building the exact environments on the server and development machine can be pretty tricky at times, especially if you are working with different technologies it can be quite difficult to keep everything working and in sync with one another. Also having too setup a server can be rather time consuming and makes it rather inflexible when you want to move to another machine or version or such and this is where Docker starts to come in. Docker is pretty great at streamlining the process and actually simplifying a lot of the building and deployment process by allowing you to specify parameters on how to construct your container in a way to run your application in both development and production and providing you use the same steps it will mean that there is pretty much no difference between these two environment setups. What is also really nice about the Docker container is that it is very easy to move around as generally you just need a `Dockerfile` in your project root which contains the build manifest for the container and then you are able to start that container anywhere that Docker is installed. The [Docker documentation] is pretty great at actually showing the steps on how to setup a container and well worth going through from start to finish as it generally can be applied to any project just using different technologies of course. On top of that it is also good to look at using Nginx as a reverse-proxy to server the port that your container is running on as this is the step that took be a little bit of figuring out but in the end it proved to be quite easy actually. For anyone looking to host any servers or technology that requires a bit of configuration I would suggest using Docker (generally easier on non Windows machines) as it really helps produce a much more flexible project that is self contained and easier to transport and update, then once you build in some CI tools like Jenkins it can become pretty amazing to update. : https://docs.docker.com/get-started/
Last edited: Jan. 27, 2019, 8:15 a.m.