Sometimes you may have changed a configuration in a Docker container with an entry script and the container has broken after the restart. In such case you may find it difficult to start the container back. Docker has provided with the most simplest way to fix broken docker containers.
First of all you want to check what is broken. You can look at the logs the container has generated with
$ docker logs --tail 100 <container_name>
The –tail switch will print only the last lines of the log and you can replace 100 with the number of lines you want to print.
Once you have debugged the issue you can then isolate the file that you want to change using docker cp. Yes! This works on stopped containers as well
$ docker cp <container_name>:/path/to/file /path/to/copy
Once you have made the change you can copy back the fixed file to the container with the same command but changing the arguments order
$ docker cp /path/to/fixed/file <container_name>:/path/to/file
A Big Thanks to this answer – https://stackoverflow.com/a/50166314/1223387 from Tomurie
*Please Note: Make sure that you know what you are doing. Otherwise you are at risk to lose all / any data and render the Docker container to be unusable permanently
post via Codincafe
For over 15 years now Amazon has been conquering the world of web hosting.
You might be unable to purchase a shared hosting plan directly from the online giant, but, more likely than not, you already have used services running on Amazon Web Services.
Netflix, Reddit, AOL, and Pinterest are some of the most popular names hosted on Amazon servers.
Even GoDaddy allied with AWS and is already moving the majority of its infrastructure to the leading Cloud service. To put things into perspective, GoDaddy is the largest web hosting provider in the world and owner of no less than nine data centers.
But what makes Amazon Web Services such a huge success?
For success it is.
$18 billion in revenue for 2017 and nearly 50% growth in the second quarter of 2018 show that the Amazon Cloud solution continues to attract new customers left and right.
To get stunned by other outrageously stupefying numbers, check out the visual narrative below about the meteoric rise to world domination of AWS:
Technologies: Linux / Unix, Git