Skip to content

Bind mounting custom .htaccess file not allowed / possible #559

@lfleuren

Description

@lfleuren

In order to configure a Wordpress Multisite setup I have been using docker bind mounts to inject a custom .htaccess file into a container.

docker compose file fragment:

    volumes:
      - type: bind
        source: /opt/custom_htaccess
        target: /var/www/html/.htaccess

Due to moving the .htaccess file to the Dockerfile a new problem arises when starting the service. It is not able to start because the .htaccess untar process fails.

wordpress_multisite.llaz7a57a6id@vps01 | tar: ./.htaccess: Cannot open: File exists
wordpress_multisite.llaz7a57a6id@vps01 | tar: Exiting with failure status due to previous errors

I prefer to use default Wordpress images, so I am wondering what would be the best solution.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions