-
Notifications
You must be signed in to change notification settings - Fork 302
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
Support Docker Volume Configuration Via Compose #607
Comments
Usually
|
I intend to code a fix for a specific use case on this issue. If anyone has suggestions on the below, please comment further on this issue so I can refine the work before starting in January 2020. I'll add support that will enable ecs-cli v1 to... P1 functionality - must have
P2 functionality - nice to have, but will release the code without it
docker-compose.ymlversion: '2'
volumes:
mydata151: <--- ecs-params `name`
external: true <--- ecs-params `autoprovision: false` and `scope: shared`
driver: 'rexray/ebs:0.11.4' <--- ecs-params `driver`
mys3bucket416: <--- ecs-params `name`
external: true <--- ecs-params `autoprovision: false` and `scope: shared`
driver: 'rexray/s3fs:0.11.4' <--- ecs-params `driver`
services:
webserver:
image: alpine
volumes:
- mydata151:/mnt/mydata
- mys3bucket416:/mnt/mybucket
... The above will be all that is needed. Just for clarity, the fix will be internally transforming the above into what would previously been required within ecs-params.yml ... docker_volumes:
- name: mydata151
scope: shared
autoprovision: false
driver: 'rexray/ebs:0.11.4'
- name: mys3bucket416
scope: shared
autoprovision: false
driver: 'rexray/s3fs:0.11.4' |
I've started work |
👍 |
I have a branch that is passing both That branch is based on ecs-cli v1.18.0 and includes
There is one A real-world version: '3.4'
volumes:
my-ebs-volume:
external: true
driver: 'rexray/ebs:0.11.4'
mytestvol2:
my-s3-bucket:
driver: 'rexray/s3fs:0.11.4'
external: true
services:
webservice:
image: alpine:3.10
network_mode: bridge
volumes:
- my-ebs-volume:/mnt/one
- mytestvol2:/mnt/two
- my-s3-bucket:/mnt/three
command: tail -f /dev/null |
@diablodale Thanks for working on this! I recommend that you just submit a pull request so that we can start code review. We won't be able to merge the pull request until your Docker CLI pull request is merged; I'll talk to the rest of the team but I do not think we will want to depend on your fork. |
Summary
Support Docker Volume Configuration via the
volumes
key in Compose.Description
With #587, support was added for Docker Volume Configuration with ECS Params. Compose provides the fields
driver
,driver_opts
, andlabels
for docker volumes- the ECS CLI could support reading these fields from Compose. The only difficulty is that in ECS, docker volumes have to be either Task Scoped or Shared Scope- no similar concept exists in Docker Compose. The default for ECS is Task Scoped, however, in Docker Compose, volumes behave more like ECS Shared Scope volumes.Please +1 this issue if you want to see Docker Compose support for Docker Volume Configuration. Please comment if you have an opinion on Shared Scope vs Task Scoped volumes
The text was updated successfully, but these errors were encountered: