Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Request - step-by-step tutorial to help someone get started #346

danyork opened this issue Nov 4, 2018 · 4 comments

Request - step-by-step tutorial to help someone get started #346

danyork opened this issue Nov 4, 2018 · 4 comments


Copy link

@danyork danyork commented Nov 4, 2018

It would be great if on there was a link to a step-by-step tutorial on how to get started with using this container image. (Or alternatively, a link / mention of another Docker image that might give you WordPress combined with MySQL - all ready to go.)

When I first saw this image on DockerHub, I thought maybe all I had to do was run the image and I'd have a working copy of WordPress I could experiment with. But then as I saw the "How to use this image" section, I realized that I needed to have a MySQL database running in a separate container. But now I need to figure out how to go and get that running, set up the appropriate users, etc.

It would be awesome if there was a step-by-step walk-through of all the steps you need to do to get this working as a WordPress instance running on your local machine.

I'm a long-time WordPress user but am newer to Docker. I was just thinking about firing up WP in a container to try out some of the WordPress 5.0 beta releases. Unfortunately I don't know all the steps to write the tutorial myself (although if I do go through the process I'll try to capture it all and document it as a tutorial).

Copy link

@wglambert wglambert commented Nov 5, 2018

A compose file is the simplest approach, and including the WORDPRESS_DB_ variables corresponding to the MYSQL_ ones will skip the database setup screen when going through the WordPress startup

version: '3'

    image: wordpress
    container_name: wordpress
    restart: always
      - ./wp-content:/var/www/html/wp-content
      - 8080:80
      - 443:443

    image: mysql:8
    container_name: mysql
    restart: always
    command: "--default-authentication-plugin=mysql_native_password"
      MYSQL_ROOT_PASSWORD: password
      MYSQL_DATABASE: wpdb
      MYSQL_USER: user
      MYSQL_PASSWORD: password

Copy link

@Drugoy Drugoy commented Nov 18, 2018

I came here to rant about poor documentation.
I lack step-by-step tutorial as well.
The biggest thing that seems to lose your attention is that provides not 1, but a SET of docker images, and they have different uses and they lack description completely.

I want wordpress based on php-fpm (instead of Apache), on Alpine Linux (instead of Debian) based and I want it to use php7.2 (rather than 5.*).

There is wordpress:php7.2-fpm-alpine image!
How to use?

All the docs are for wordpress image, which is wordpress:latest, which is Apache-based.
No, goddamn it, I want webserver (proxy) to work separately from php-fpm!

Copy link

@danyork danyork commented Nov 19, 2018

@wglambert - That's brilliant! Thanks so much. I copied that to my local system, tweaked it to have different passwords, did docker-compose up and... ta da... there it was! Thanks!

Copy link

@danyork danyork commented Nov 21, 2018

For the sake of completeness, I am documenting why @yosifkit closed this issue. A section has been added to:

that contains the YAML file from @wglambert above. This is now also visible at:

The section also has the relevant commands for docker stack and docker-compose.

This is helpful. I think there might be a way to make it even a bit easier to understand for a newcomer to Docker, and if I get the cycles to work on something I'll re-open this ticket and send in a pull request. Meanwhile, I'm glad to see it is up there.

Thank you for adding the text.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
3 participants