支付宝赞助帐号:service@kuitao8.com 

ubuntu用shell安装docker的方法

Created2017-07-22   Views 105    Author 懒人程序
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"
上一篇: Linux统计某文件夹或文的个数
下一篇: 使用Docker来搭建gitlab方法
支持键盘 ← →

邮件订阅

订阅我们的精彩内容