docker-compose / wordpress permissions error for volume mount

my docker-compose.yml

wordpress:
  image: wordpress
  links:
    - wordpress_db:mysql
  ports:
    - 8080:80
  volumes:
    - /tmp/html/:/var/www/html
wordpress_db:
  image: mysql:5.6.29
  environment:
    MYSQL_ROOT_PASSWORD: password
phpmyadmin:
  image: corbinu/docker-phpmyadmin
  links:
    - wordpress_db:mysql
  ports:
    - 8181:80
  environment:
    MYSQL_USERNAME: root
    MYSQL_ROOT_PASSWORD: password

when I do

  • Kubernetes service in java does not resolve restarted service/replicationcontroller
  • Docker on W10 and Hyper-V “no Procfile path defined”
  • Docker (compose) fails to build container when mounting single file from official WordPress image
  • Downgrade to PHP 5.4.45 in Phusion Docker
  • importerror:no module name docker.client
  • Photon vmware pros and cons
  • sudo /usr/local/bin/docker-compose up

    I’m getting a lot of these

    wordpress_1     | tar: ./wp-content/plugins/akismet/views/stats.php: Cannot open: No such file or directory
    wordpress_1     | tar: ./wp-content: Cannot mkdir: Permission denied
    wordpress_1     | tar: ./wp-content/plugins/akismet/wrapper.php: Cannot open: No such file or directory
    wordpress_1     | tar: ./wp-content: Cannot mkdir: Permission denied
    wordpress_1     | tar: ./wp-content/plugins/akismet/.htaccess: Cannot open: No such file or directory
    wordpress_1     | tar: ./wp-content: Cannot mkdir: Permission denied
    wordpress_1     | tar: ./wp-content/plugins/akismet/class.akismet-widget.php: Cannot open: No such file or directory
    wordpress_1     | tar: ./wp-content: Cannot mkdir: Permission denied
    wordpress_1     | tar: ./wp-content/plugins/akismet/class.akismet-admin.php: Cannot open: No such file or directory
    wordpress_1     | tar: ./wp-content: Cannot mkdir: Permission denied
    wordpress_1     | tar: ./wp-content/plugins/akismet/class.akismet.php: Cannot open: No such file or directory
    wordpress_1     | tar: ./wp-content: Cannot mkdir: Permission denied
    wordpress_1     | tar: ./wp-content/plugins/akismet/readme.txt: Cannot open: No such file or directory
    wordpress_1     | tar: ./wp-content: Cannot mkdir: Permission denied
    wordpress_1     | tar: ./wp-content/plugins/akismet/index.php: Cannot open: No such file or directory
    wordpress_1     | tar: ./wp-content: Cannot mkdir: Permission denied
    wordpress_1     | tar: ./wp-content/plugins/akismet/_inc: Cannot mkdir: No such file or directory
    wordpress_1     | tar: ./wp-content: Cannot mkdir: Permission denied
    wordpress_1     | tar: ./wp-content/plugins/akismet/_inc/img: Cannot mkdir: No such file or directory
    wordpress_1     | tar: ./wp-content: Cannot mkdir: Permission denied
    wordpress_1     | tar: ./wp-content/plugins/akismet/_inc/img/logo-full-2x.png: Cannot open: No such file or directory
    wordpress_1     | tar: ./wp-content: Cannot mkdir: Permission denied
    wordpress_1     | tar: ./wp-content/plugins/akismet/_inc/form.js: Cannot open: No such file or directory
    wordpress_1     | tar: ./wp-content: Cannot mkdir: Permission denied
    wordpress_1     | tar: ./wp-content/plugins/akismet/_inc/akismet.css: Cannot open: No such file or directory
    wordpress_1     | tar: ./wp-content: Cannot mkdir: Permission denied
    wordpress_1     | tar: ./wp-content/plugins/akismet/_inc/akismet.js: Cannot open: No such file or directory
    wordpress_1     | tar: ./wp-content: Cannot mkdir: Permission denied
    wordpress_1     | tar: ./wp-content/plugins/akismet/akismet.php: Cannot open: No such file or directory
    wordpress_1     | tar: ./wp-content: Cannot mkdir: Permission denied
    wordpress_1     | tar: ./wp-content/plugins/akismet/LICENSE.txt: Cannot open: No such file or directory
    wordpress_1     | tar: ./wp-content: Cannot mkdir: Permission denied
    wordpress_1     | tar: ./wp-content/index.php: Cannot open: No such file or directory
    wordpress_1     | tar: ./wp-trackback.php: Cannot open: Permission denied
    wordpress_1     | tar: ./wp-links-opml.php: Cannot open: Permission denied
    wordpress_1     | tar: ./wp-cron.php: Cannot open: Permission denied
    wordpress_1     | tar: ./wp-signup.php: Cannot open: Permission denied
    wordpress_1     | tar: .: Cannot utime: Permission denied
    wordpress_1     | tar: .: Cannot change ownership to uid 33, gid 33: Permission denied
    wordpress_1     | tar: .: Cannot change mode to rwxr-xr-x: Permission denied
    wordpress_1     | tar: Exiting with failure status due to previous errors
    

    any ideas?

    I set 777 to /tmp/html

  • docker https for local development
  • How to replace volumes_from in docker-composer v3
  • Docker says: No connection could be made because the target machine actively refused it
  • Jenkins ANT scripting: Save file with timestamp
  • How can I set $PS1 with Dockerfile?
  • understanding parameters passed to -v in Docker
  • One Solution collect form web for “docker-compose / wordpress permissions error for volume mount”

    Regarding the permission denied part, this could be linked to:

    • the host (on Windows or ac, only C:\Users or /Users is mounted by the Linux VirtualHost)
      That would make /tmp empty, resulting in an empty /var/www/html.
    • the Linux sec policy (see docker-library/wordpress issue 132) if you are directly on a Linux host.

    The problem is that setenforce 0 works differently on Fedora and CentOS

    Docker will be the best open platform for developers and sysadmins to build, ship, and run distributed applications.