- Docker Quick Start Guide
- Earl Waud
- 319字
- 2021-06-10 19:07:02
Post-install steps you might want to consider
All three of the install methods automatically create a docker group for you, but if you want to be able to run Docker commands without using root or sudo, then you will want to add your user to the docker group.
Adding the current user to the docker group is easily accomplished with the following command:
# add the current user to the docker group
sudo usermod -aG docker $USER
You will need to log out and log back in to update the group memberships on your account, but once you have done that, you should be all set to execute any Docker commands without using sudo.
This can be validated by running the hello-world container without sudo:
# test that sudo is not needed
docker run hello-world
Next, you will want to configure your system to have the Docker service start on system-boot:
# configure docker to start on boot
sudo systemctl enable docker
Another post-install step you should consider is installing docker-compose.
This tool can be an important addition to your Docker tool belt and we will be discussing its use in Chapter 7, Docker Stacks. The command to install docker-compose is:
# install docker compose
sudo curl -L \
https://github.com/docker/compose/releases/download/1.21.2/docker-compose-$(uname -s)-$(uname -m) \
-o /usr/local/bin/docker-compose
sudo chmod +x /usr/local/bin/docker-compose
Congratulations, your CentOS workstation is now ready to start developing your Docker images and deploying your Docker containers. Next up, we will learn how to install Docker onto a DEB-based system using an Ubuntu workstation. If you're ready, read on.
- Managing Mission:Critical Domains and DNS
- Getting Started with Oracle SOA B2B Integration:A Hands-On Tutorial
- 機(jī)器學(xué)習(xí)流水線實(shí)戰(zhàn)
- AutoCAD 2012中文版繪圖設(shè)計高手速成
- 工業(yè)控制系統(tǒng)測試與評價技術(shù)
- Visual FoxPro數(shù)據(jù)庫基礎(chǔ)及應(yīng)用
- Statistics for Data Science
- 基于企業(yè)網(wǎng)站的顧客感知服務(wù)質(zhì)量評價理論模型與實(shí)證研究
- 計算機(jī)辦公應(yīng)用培訓(xùn)教程
- Microsoft System Center Data Protection Manager Cookbook
- Wireshark Revealed:Essential Skills for IT Professionals
- 工廠電氣控制設(shè)備
- 傳感器應(yīng)用技術(shù)
- 這樣用Word!
- 多傳感器數(shù)據(jù)智能融合理論與應(yīng)用