> 文档中心 > 【EdgeX】安装Docker和Docker Compose,并运行EdgeX

【EdgeX】安装Docker和Docker Compose,并运行EdgeX


1、安装Docker

sudo apt-get updatesudo apt-get install -y apt-transport-https  ca-certificates curl gnupg lsb-releasecurl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo gpg --dearmor -o /usr/share/keyrings/docker-archive-keyring.gpgecho "deb [arch=amd64 signed-by=/usr/share/keyrings/docker-archive-keyring.gpg] https://download.docker.com/linux/ubuntu \  $(lsb_release -cs) stable" | sudo tee /etc/apt/sources.list.d/docker.list > /dev/nullsudo apt-get updatesudo apt-get install -y docker-ce docker-ce-cli containerd.iosudo systemctl enable docker# add  user to docker rightsudo gpasswd -a ${USER} dockersudo chown ${USER}:${USER} /var/run/docker.socksudo systemctl restart docker

2、安装DockerCompose

运行以下命令下载 Docker Compose 的当前稳定版本

sudo curl -L "https://github.com/docker/compose/releases/download/1.24.0/docker-compose-$(uname -s)-$(uname -m)" -o /usr/local/bin/docker-co