This is my first time to write a post for docker, and I hope it wouldn’t be the last. The reason why I write this docker tutorial is because of a small project. Yes, a small project which need to be deployed by docker. It takes me 6 hours to learn docker and use it to deploy Python project and Java project. Besides that, the project need to read a configuration file from a fixed location in the file system (inside Docker envoriment). Basing on the deploy envorinment, the configuration file is different. For example, configuration file for development and production is totally different. For security reason and easy management, all configuration files are hosted on a remote server. So when running the docker, we shall download the corresponding configuration file from the remote server by passing the arguments in the docker command line. Here I will not repeat what’s the Docker and what benefits we can get from Docker, as you can get all the information from Docker homepage. In this post, I will describe how to make a docker image which can expect outside arguments. And this time, I will host all the source code on my public git. Hope it will help you to solve your problem within 6 minutes.
Read more