coure2011
coure2011

Reputation: 42444

How to make a Docker image of a WordPress site?

I have a WordPress site hosted by a provider on shared LAMP hosting. I want to create the Docker image of that web application so that can easily deploy the same image app anywhere and distribute among my developers. Can some one please provide the brief steps?

I am totally new to Docker.

Upvotes: 1

Views: 557

Answers (2)

OkieOth
OkieOth

Reputation: 3704

The switch to docker isn't done in one day. First you need to become familiar with the docker tools and speech. Then you need find your own structure to handle the containers (I prefer bash scripts). Last but not least you need to build images and container for your app. I need about three months to port my app, but after all imo it was all worth.

Here are my steps to start:

  1. Normally one docker container means one running process. So at first you should think about how many containers you will finally need. I need usually 3 container for a normal java webapp (Apache HTTP,Apache Tomcat, Database)

  2. Looking for existing images (for instance at docker hub) that bring all the features you need.

  3. Become familiar with the images and build, start and stop containers.

  4. Build your own images with your application code based on the images of step 2.

  5. Bring your app locally.

  6. Release your images and container to your webserver.

Upvotes: 2

nagrom97
nagrom97

Reputation: 514

First you might have to create the container by hand, which is painful, but if its to be reused multiple times it is not wasted effort, then You can commit and push the container to a public docker hub repository, providing you have a docker hub account with docker commit CONTAINER [REPOSITORY[:TAG]]. You can then push it which is really nice as then it is publicly available to anyone using the docker search command :)

Upvotes: 0

Related Questions