aws / amazon-ecs-init

Amazon Elastic Container Service RPM
http://aws.amazon.com/ecs
Apache License 2.0
198 stars 119 forks source link

feat: permit building ecs-init that will run inside a strict snap #475

Closed stuart-warren closed 3 months ago

stuart-warren commented 2 years ago

Summary

Permits the binary to work within a strictly confined snap

ref: aws/containers-roadmap#1487

Implementation details

Testing

Building a strictly confined snap and running on Ubuntu Core 20

New tests cover the changes: no

Description for the changelog

Feature - enable functionality within a strictly confined snap when built with snap build flag

Licensing

This contribution is under the terms of the Apache 2.0 License: yes

stuart-warren commented 2 years ago

currently failing tests due to my change to only mount existing directories.

discussing changes in separate issue aws/amazon-ecs-agent#3152

https://github.com/aws/amazon-ecs-init/blob/d5b2b34772c48306a5ee6d8fb82cd0cc0267e7ad/ecs-init/docker/docker_test.go#L261-L285

https://github.com/aws/amazon-ecs-init/blob/d5b2b34772c48306a5ee6d8fb82cd0cc0267e7ad/ecs-init/docker/docker_test.go#L317-L321