Reputation: 41
I'm using docker-compose on my local machine for development environment,
and use volumes
attribute in docker-compose.yml to mount source directory.
docker-compose.yml is like this.
services:
nginx:
build:
context: ./nginx
volumes:
- ./project/public:/var/www/html/public
ports:
- "80:80"
- "443:443"
php-fpm:
build:
context: ./php-fpm
volumes:
- ./project:/var/www/html
ports:
- "9000:9000"
Now I'd like to use AWS ECS and ECR for launching the service.
However, I don't know how to mount the source code to the docker containers.
I'm using Nginx and PHP-FPM containers. Those are the containers I'd like to mount the source code to.
Do I need to write the git clone
command in Dockerfile?
Thanks.
Upvotes: 4
Views: 530
Reputation: 194
In a task definition, you'll need to create a volume and then a mountpoint here
Upvotes: 1