How to create Docker Image based on EC2 AMI image?

1

I installed several things on my CentOS EC2 instance (Java, MySql, gradle, setup local application...).

Also recently created EC2 AMI image out of all that.

Is it possible to create a Docker image directly from AMI image or what is the best way to do it?

(I just want to have all installations, java, app, setups inside a Docker image with minimal docker tuning/setup/troubleshooting, do not care how is done - either from AMI image or from some of the folders inside EC2)..

Joe

Posted 2018-03-22T23:38:14.987

Reputation: 111

Answers

0

As far as I know there no save as ... > Docker Image-solution. Also, seeing that you have Java, MySql, gradel, and more on that image, I don't think this is something you'd want to run in a single Docker container.

You'd probably want to run your MySql database and 'local application' (that uses that database?) in separate docker containers. These could easily be tied together with a docker-compose.yml-file.

Martin

Posted 2018-03-22T23:38:14.987

Reputation: 83