container selinux policy support in ECS task definition

0

HI,

We are using Amazon Linux 2 AMI for ECS machine. seLinux enabled at host level. But not clear on how to implement the selinux policies at container level in task definition.

Steps followed to install container linux:

$ sudo yum update -y

$ sudo amazon-linux-extras enable selinux-ng

$ sudo amazon-linux-extras install selinux-ng

$ yum install container-selinux

Can you confirm if it is supported or not? If supported please guide on the steps to create selinux policy and apply the same at the container level using ECS task definition.

Thanks in advance.

已提問 2 年前檢視次數 239 次
1 個回答
0

Good Day @rePost-User-5512672,

Thanks for your query and apologies for delay in sending a response to your query here. As I can understand that you want to apply policies at container-level with seLinux enabled at the Host-Level (EC2 Machine). Please correct me if I have misunderstood your query here.

As I can see and test-replicate as well at my level, this feature is already out and can be tracked via this closed issue [1]. Along with that, I followed to use AL2 with SELinux Enforcing Mode [2] and went ahead directly to use "yum install container-selinux" which helped me to cutomized and list all the policies.

Coming to container-level, it purely depends in what shell/OS base image you're using for your container. Accordingly, you can reach out to AmazonLinux Development Team at [3] for further help and guidance.

I hope this information will help you to get-started with your use-case. Thanks for connecting with us at AWS re:Post.

References:

  1. https://github.com/amazonlinux/amazon-linux-2022/issues/56
  2. https://aws.amazon.com/marketplace/pp/prodview-yapnhwu5qgreo
  3. https://github.com/amazonlinux/amazon-linux-2022/issues
profile pictureAWS
支援工程師
已回答 2 年前

您尚未登入。 登入 去張貼答案。

一個好的回答可以清楚地回答問題並提供建設性的意見回饋,同時有助於提問者的專業成長。

回答問題指南