ECS Cluster And Container Fargate Type Qustion

0

The current environment has also built both ECSCluster Fargate and Container types with Fargate. To improve container security, we would like to create a user other than Root privileges and run the container. By the way, if it's a Fargate type, it's Serverless, but without customizing it and using the permissions of the user at the time of container execution I'd like to know if it can be done.

Juns
已提問 7 個月前檢視次數 222 次
1 個回答
0

Yes, it is possible to run your container with an arbitrary user. In your Dockerfile, you should create an user, and use the USER directive to change the default user in your container.

FROM microsoft/windowsservercore
# Create Windows user in the container
RUN net user /add patrick
# Set it for subsequent commands
USER patrick

By the way, if it's a Fargate type, it's Serverless, but without customizing it and using the permissions of the user at the time of container execution

Since it is serverless, you cannot manage the Docker's host machine (NOT the container) and I don't think you need to. The security responsibility lies on AWS, not you.

profile picture
HS
已回答 7 個月前
  • What I'm concerned about is that if you set an existing ECS container to the instance type and run it, the application will run with root user privileges on that container unless you specify a user. In the case of Fargate type, I wonder which user's permissions will be executed without customization.

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

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

回答問題指南