- Deployment with Docker
- Srdjan Grubor
- 146字
- 2021-07-02 23:22:14
Changing the current user
We have explained why we need to run our service as a limited user and how we created the user for it, but now is the time to permanently switch the context to pythonsrv. Using USER pythonsrv, any further commands will be executed as pythonsrv user, including the container's CMD executable command, which is exactly what we want. Just like WORKDIR, this directive can be used multiple times in a Dockerfile, but for our purposes, there is no need to do the rest of the configuration as non-root. Generally, it is a good practice to keep this layer statement as high as possible in the Dockerfile since it is very unlikely that it will change and would be unlikely to break cache. However, for this example, we can't move it higher as our previous command uses chown, which requires root privileges.
- 32位嵌入式系統與SoC設計導論
- Learning Social Media Analytics with R
- 觸控顯示技術
- 單片機C語言應用100例
- 內模控制及其應用
- 網絡管理工具實用詳解
- Visual FoxPro程序設計
- 格蠹匯編
- Visual C++項目開發案例精粹
- The DevOps 2.1 Toolkit:Docker Swarm
- Building Google Cloud Platform Solutions
- Creating ELearning Games with Unity
- FreeCAD [How-to]
- Mastering Microsoft Dynamics 365 Customer Engagement
- 我的IT世界