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
If you use a Mac you must have seen the pesky DS_Store files at a lot of places. These files store custom attributes of a folder on your Apple macOS. These files, though important on your local machine, may get into your projects sometimes and get committed in Git repositories as well. If you publish your open source codes on marketplaces like ThemeForest then they require that you make sure that there are no such files in the codes submitted.
There are 2 ways in which we have the DS_Store files in our projects.
In this step, we delete all DS_Store files recursively from a directory. To do this go to the folder where you want to delete all these files from your terminal and enter the following command
$ find . -name '.DS_Store' -type f -delete
Please make sure you are in the correct folder and you know what you are doing. We will not be responsible for any unwanted effects that may happen on your computer
This is probably the safest way to make sure that DS_Store does not enter in your Git repositories. To do this we will create a global Git ignore file
$ echo .DS_Store > ~/.gitignore_global
Now we will configure Git to use this global ignore file so that it takes effect to all your Git repo
$ git config --global core.excludesfile ~/.gitignore_global
That’s it. Now your DS_Store files will not get into your repo’s and you can code with peace!
AWS – The basket which showcased plenty of development tools, than the chapters in any programming language. Luckily i never found the ease to work with any cloud except AWS.
AWS provides the free tier services free for 1 year, which makes it more suitable for developers to practice real time developments & even facilitates your future with the pay as you go concept.
AWS Comprises 100’s of tool’s whereas this article only explains about the majority ones.
and many more….
Let’s get it more generalized –
All those who have worked with couple of hosting providers like, godaddy, bigrock etc. will have a hard way for getting this initially, but trust me when you learn it you can see the benefits of AWS.
Step 1: Create your bucket on S3.
Step 2: Configure your bucket.
Step 3: Deploy your website.
Step 4 (Optional): Register Your Domain Name.
Step 5 (Optional): Associate a Domain Name with Your Website.
Step 6 (Optional): Speed Up Your Website by Using CloudFront
Step 7: Clean Up Your Resources
Understand & read the above steps in details ->
You learn about hosting a website over AWS S3 which is extensively expandable to enterprise level , route your DNS to your stored server & speed up your website using Amazon CloudFront .
Stay tuned for next article where i will share – How to host a web app on AWS ?
Last time with the AWS basics… , i hope all my viewers would have got a clear picture on how to host a basic static website on AWS . In this version i will provide you a heads up in launching your web application on AWS.
AWS has literally generated a huge scope for developers by providing these services free for first year. So that devs will get the scalability and support vision on AWS which may take couple of grands if we simply have to learn it on hosting servers like godaddy, bigrock, digital ocean etc.
This article walks you through the process of hosting a web app on AWS.
We’ll use the AWS Management Console to access AWS.
Alternatively, you can use Elastic Beanstalk to create, load balance, scale, and monitor your servers.
Your Name (required)
Your Email (required)