Closed stuart-warren closed 3 months ago
Permits the binary to work within a strictly confined snap
ref: aws/containers-roadmap#1487
add go build flag snap
snap
add make target snap-compatible
snap-compatible
add config.ResolveDirectory() and config.ResolveDockerDirectory() to add prefixes to paths where required
config.ResolveDirectory()
config.ResolveDockerDirectory()
add config.HomeDirectory() due to snaps having a different structure and different home directory
config.HomeDirectory()
only mount host directories into agent container that exist due to read only filesystem
Building a strictly confined snap and running on Ubuntu Core 20
New tests cover the changes: no
Feature - enable functionality within a strictly confined snap when built with snap build flag
This contribution is under the terms of the Apache 2.0 License: yes
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
Summary
Permits the binary to work within a strictly confined snap
ref: aws/containers-roadmap#1487
Implementation details
add go build flag
snap
add make target
snap-compatible
add
config.ResolveDirectory()
andconfig.ResolveDockerDirectory()
to add prefixes to paths where requiredadd
config.HomeDirectory()
due to snaps having a different structure and different home directoryonly mount host directories into agent container that exist due to read only filesystem
Testing
Building a strictly confined snap and running on Ubuntu Core 20
New tests cover the changes: no
Description for the changelog
Licensing
This contribution is under the terms of the Apache 2.0 License: yes