kuborgh / docker-php-5.2

PHP 5.2 Docker Image for Docker Hub
MIT License
25 stars 44 forks source link

Where is the top directory of this docker image? #2

Closed seonghobae closed 5 years ago

seonghobae commented 5 years ago

Hello,

I can not find where the top directory of this docker image, especially 'project' directory is. When I try to run this image, apache was hanging with the error message, could not find '/project' directory.

I'm a newbie in Docker, so, please let me know how can I implement my project files with this docker image.

Best, Seongho

hgiesenow commented 5 years ago

The folder /project is right. You need to bind-mount your source code into that directory. I suggest using docker-compose for this purpose (https://docs.docker.com/compose/compose-file/#volumes).

seonghobae commented 5 years ago

Thanks for the reply, so How about Like this?

version: "3.2"
services:
  web:
    image: kuborgh/php-5.2
    volumes:
      - type: volume
        source: mydata
        target: /data
        volume:
          nocopy: true
      - type: bind
        source: ./project
        target: /opt/app/project

volumes:
  mydata:
MilesHart commented 5 years ago

I'm struggling with this, I'm a noobie (isn't everyone to a degree?).

This will get you started. (Windows volume path)

docker run --rm -d -p 80:80/tcp -v c:\docker\phpinfo:/project kuborgh/php-5.2:latest

m1st3rl1 commented 5 years ago

hey, we no longer support and upgrade this one. Please use an official php image.