linux就该这么学pdf免费下载
wget https://raw.githubusercontent.com/ApolloAuto/apollo/master/docker/scripts/install_docker.sh
bash install_docker.sh
sudo usermod -aG docker 当然用户名
sudo docker ps
install_docker.sh文件
#!/usr/bin/env bash
###############################################################################
# Copyright 2017 The Apollo Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
###############################################################################
set -x
sudo apt-get -y install curl \
"linux-image-extra-$(uname -r)" \
linux-image-extra-virtual
sudo apt-get -y install apt-transport-https ca-certificates
curl -fsSL https://yum.dockerproject.org/gpg | sudo apt-key add -
sudo add-apt-repository \
"deb https://apt.dockerproject.org/repo/ \
ubuntu-$(lsb_release -cs) \
main"
sudo apt-get update
sudo apt-get -y --force-yes install docker-engine
sudo usermod -aG docker "$USER"
转载请注明:谷谷点程序 » ubuntu用shell安装docker的方法