- 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.
- 電氣自動(dòng)化專業(yè)英語(第3版)
- 嵌入式系統(tǒng)應(yīng)用
- Canvas LMS Course Design
- 走入IBM小型機(jī)世界
- 西門子S7-200 SMART PLC從入門到精通
- 離散事件系統(tǒng)建模與仿真
- CorelDRAW X4中文版平面設(shè)計(jì)50例
- STM32G4入門與電機(jī)控制實(shí)戰(zhàn):基于X-CUBE-MCSDK的無刷直流電機(jī)與永磁同步電機(jī)控制實(shí)現(xiàn)
- 單片機(jī)C語言應(yīng)用100例
- Hadoop應(yīng)用開發(fā)基礎(chǔ)
- Mastering Geospatial Analysis with Python
- 電腦故障排除與維護(hù)終極技巧金典
- Effective Business Intelligence with QuickSight
- Serverless Design Patterns and Best Practices
- 玩轉(zhuǎn)PowerPoint