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

How to expose the source code inside the docker container to the host? #28

Open
HuyNguyen206 opened this issue Apr 19, 2024 · 3 comments

Comments

@HuyNguyen206
Copy link

HuyNguyen206 commented Apr 19, 2024

After following the instruction, I can access the web in localhost but I can't see the source code in the host machine. I can only access it inside the PHP docker container.

So how to expose the source code inside the docker container to the host? So I can edit it in development env?
image

Usually, I use the volume like this in PHP container - .:/opt/drupal, but it doesn't work in this case

@Renrhaf
Copy link
Sponsor

Renrhaf commented Apr 19, 2024

Hi @HuyNguyen206, in the docker image the work directory is /app, maybe it would work if you switch to a volume like :

    volumes:
      - .:/app:cached

EDIT: Oh sorry you're right, I am using the base dunglas/frankenphp:1-php8.3 as upstream.

@HuyNguyen206
Copy link
Author

HuyNguyen206 commented Apr 19, 2024

@Renrhaf As I checked in dockerfile, the WORKDIR is /opt/drupal, not /app. Even though, it doesn't work

volumes:
      - .:/opt/drupal:cached

@HuyNguyen206
Copy link
Author

hi @dunglas , could you help me to solve this issue? Maybe I am missing some configuration related to docker but I am not sure. Thank you in advanced.

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