Skip to content

Mapping /var/www/html to existing wp folder #84

@tubia

Description

@tubia

Hi all,
I created a docker-compose file to make the images work taking an existing wordpress folder that is on my home.
Here is the docker-compose.yml

wordpress:
  image: wordpress
  links:
    - db:mysql
  ports:
    - 8082:80
  environment:
    WORDPRESS_DB_USER: test
    WORDPRESS_DB_PASSWORD: test
    WORDPRESS_DB_NAME: test
  volumes:
     - /home/tubia/test/:/var/www/html

db:
  image: mysql
  environment:
    MYSQL_ROOT_PASSWORD: example
    MYSQL_DATABASE: test
    MYSQL_USER: test
    MYSQL_PASSWORD: test

This results in the installation page, when I visit localhost:8082, so it is not taking the volume as configured. Also If I enter the container with docker exec -ti wp_container /bin/bash and ls the /var/www/html, it's a standard default wp installation, not the one I mapped with the volume.

Hints? It is the expected behaviour?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions