Docker, the leader of the industry for developing and maintaining websites. Docker is extremely powerful because it allows developers to package applications into containers. This has many benefits including saving time, money, and allowing for scalability. It allows allows for developers to test applications in its own “Container” in a timely manner.
Honestly before 2 weeks ago, I had no idea what Docker was. I learned lot with how and why it works once I started to get hands on with docker. But before we get into that I wanted to address what docker needs in order to run your application.
The docker file is the most crucial part needed to set up an application in docker. Here is an example of a simple docker-file for the newsAPI micro service that I can post how to setup in docker towards the end of this post. Basically what this “DockerFile” does is that is automates all the code and commands needed to setup the application on a new device(In this case the new device is the new docker instance.)
Step One: Add a new instance into your docker playground
Step Two: Clone the necessary project from GitHub Example: get clone "GitHub Link here"
Note: Do not use parenthesis in your code for this step
Step Three: Create your Docker file by using: touch DockerFile
Step Four: You can now use the editor to insert the necessary code into your DockerFile (Use the screenshot above to help you setup the correct commands needed into your docker file.) Note: Some Applications will need more steps within the file to get it to run within docker.
Here are some screen shots to show what the end result looks like once you are able to get the newsAPI Micro Service setup. Screenshot 1(the end result): Screenshot 2(Manually searching through the API data base for tesla info):