I find it to be a terrible idea to have the neccesarity to copy your src folder. You can achieve this, with also bringing the possibility of not having to be inside the container to edit project files, through creating volumes inside a service.
Like so
services: app: build: context: docker dockerfile: app/app.dockerfile working_dir: /var/www/html volumes: - ./laravel:/var/www/html:cached - ~/.composer/cache:/var/www/.composer/cache/:delegated ports: - 80:80
Thanks so much for this info.. I am completely new to Docker, even not touching the volumes part of Docker.
volumes
So this is docker-compose, right? Thanks!
What if you're currently restricted to only using Dockerfile? Can you achieve this as the same?
Are you sure you want to hide this comment? It will become hidden in your post, but will still be visible via the comment's permalink.
Hide child comments as well
Confirm
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
I find it to be a terrible idea to have the neccesarity to copy your src folder. You can achieve this, with also bringing the possibility of not having to be inside the container to edit project files, through creating volumes inside a service.
Like so
Thanks so much for this info.. I am completely new to Docker, even not touching the
volumes
part of Docker.So this is docker-compose, right? Thanks!
What if you're currently restricted to only using Dockerfile? Can you achieve this as the same?