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

Can't use volume to map /var/www/html #129

Closed
gerroon opened this issue Apr 19, 2019 · 2 comments
Closed

Can't use volume to map /var/www/html #129

gerroon opened this issue Apr 19, 2019 · 2 comments

Comments

@gerroon
Copy link

gerroon commented Apr 19, 2019

Hi

I am using

version: '3'
services:
  my_app:
    image: thecodingmachine/php:7.3-v2-apache-node10
    environment:
      # Enable the PostgreSQL extension
      PHP_EXTENSION_PGSQL: 1
      # Disable the Mysqli extension (otherwise it is enabled by default)
      PHP_EXTENSION_MYSQLI: 0
      #APACHE_DOCUMENT_ROOT: /var/www/html
    ports:
      - "2080:80"  

    volumes:
      - /media/var/www/html:/var/www/html

However I cant seem to be able to acces any of the webapps under /media/var/www/html I am not sure what I am missing here.

"GET /webapp/ HTTP/1.1" 404 506 "-" "Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Firefox/60.0

I am using Docker on Debian Buster x64
thanks

@moufmouf
Copy link
Member

This is weird, this should definitely be working.

The "/media/var/www/html" directory does exist on your host, does it?
Are there any chances Docker could have problems accessing the "/media" directory (maybe if this is a mounted drive with some weird file system?)
Could you try mapping a more classic directory?

What OS are you using?

This is most likely a mounting problem not related to the image.
You could try to bash into the image and see if your files appear in /var/www/html:

$ docker-compose exec my_app bash

@gerroon
Copy link
Author

gerroon commented Apr 19, 2019

Thanks I will take a look it, good to know it is a mount issue.

@gerroon gerroon closed this as completed Apr 19, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants