安装apollo时没有install_docker.sh
在安装apollo时,git apollo源码
|
git clone https://github.com/ApolloAuto/apollo.git |
之后 执行:bash docker/scripts/install_docker.sh 发现没有install_docker.sh脚本文件,则需要手动安装docker
在Ubuntu 16.04 中安装Docke
ubuntu 16.04 安装Docker
通过Docker源安装最新版本。要安装最新的 Docker 版本,首先需要安装 apt-transport-https 支持,之后通过添加源来安装。
sudo apt-get install apt-transport-https
sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys 36A1D7869245C8950F966E92D8576A8BA88D21E9
sudo bash -c "echo deb https://get.docker.io/ubuntu docker main > /etc/apt/sources.list.d/docker.list"
sudo apt-get update
sudo apt-get install lxc-docker
安装之后启动 Docker 服务。
sudo service docker start
紧接着是拉取Docker镜像。镜像是Apollo官方定期发布,一般是每周发布的运行环境的镜像。拉取完成之后,脚本会根据镜像创建Apollo运行的容器环境。
sudo bash docker/scripts/dev_start.sh -C
在运行容器无误的情况下,可以通过Apollo提供的脚本进入该容器。
|
sudo bash docker/scripts/dev_into.sh |
第二种方法:直接添加nstall_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 install docker-engine
sudo usermod -aG docker "$USER"
第三种方法:直接运行脚本文件,如下:
in host pc,by:
./docker/setup_host/install_docker.sh
鉴于前两种,apollo2.5 版本之前似乎把 install_docker.sh 文件放在 docker文件下的scripts文件下,没有找到!!!