apt-get과 함께 설치되었음에도 도커 명령을 찾을 수 없습니다.
만약 그런 대답이 있었다면 10분을 절약할 수 있었을 것이기 때문에 다른 사람들을 위해 이것을 추가하는 것.
Ubuntu 14.0을 사용하여 Docker를 설치해 보았습니다.LTS 가상 상자
sudo apt get install docker
그러나 도커를 실행하려고 하면 다음 오류가 발생합니다.
The program 'docker' is currently not installed. You can install it by typing: sudo apt-get install docker
왜 우분투는 도커를 볼 수 없습니까?
Ubuntu 패키지docker실제로는 GUI 애플리케이션을 지칭하는 것이지 우리가 찾는 데브옵스 툴을 의미하는 것은 아닙니다.
도커에 대한 지침은 도커 페이지의 지침에 따라 수행할 수 있습니다. https://docs.docker.com/engine/install/ubuntu/
업데이트됨(고마워 @Scott Stensland) ===
이제 다음 설치 스크립트를 실행하여 도커를 가져옵니다.
curl -sSL https://get.docker.com/ | sudo sh
- 참고: 웹 사이트에서 스크립트를 검토하고 이 sudo를 실행하고 있으므로 계속하기 전에 올바른 링크가 있는지 확인합니다.
도커를 설치하는 스크립트가 실행됩니다.스크립트의 마지막 부분을 기록합니다.
If you would like to use Docker as a non-root user, you should now consider
adding your user to the "docker" group with something like:
sudo usermod -aG docker stens
Remember that you will have to log out and back in for this to take effect!
도커를 업데이트하려면 다음을(를) 실행:
sudo apt-get update && sudo apt-get upgrade
진행 상황에 대한 자세한 내용은 도커 설치 설명서 또는 아래의 @Scott Stensland 답변을 참조하십시오.
.
업데이트: sudo와 불편한 사람들을 위한 | sh ===
일부 의견에서는 임의 스크립트를 sudo로 실행하는 것이 위험하다고 언급했습니다.위의 옵션은 작업을 단순화하기 위해 도커의 편의 스크립트입니다.그러나 보안에 중점을 두고 있지만 스크립트를 읽지 않으려는 사용자는 다음을 수행할 수 있습니다.
- 종속성 추가
sudo apt-get update; \
sudo apt-get install \
apt-transport-https \
ca-certificates \
curl \
gnupg-agent \
software-properties-common
- 도커 gpg 키 추가
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add -
(보안 확인, 키 지문 확인)9DC8 5822 9FC7 DD38 854A E2D8 8D81 803C 0EBF CD88
$ sudo apt-key fingerprint 0EBFCD88
pub rsa4096 2017-02-22 [SCEA]
9DC8 5822 9FC7 DD38 854A E2D8 8D81 803C 0EBF CD88
uid [ unknown] Docker Release (CE deb) <docker@docker.com>
sub rsa4096 2017-02-22 [S]
)
- 리포지토리 설정
sudo add-apt-repository \
"deb [arch=amd64] https://download.docker.com/linux/ubuntu \
$(lsb_release -cs) \
stable"
- 도커 설치
sudo apt-get update; \
sudo apt-get install docker-ce docker-ce-cli containerd.io
작동했는지 확인하려면 다음을 실행합니다.sudo docker run hello-world
다음은 이 이름이 이렇게 지정된 이유를 설명합니다.Ubuntu에 도커를 설치해야 하는 이유는 무엇입니까? sudo apt-get install docker.io ?
중요 - Ubuntu 패키지docker완전히 다른 것입니까(피하십시오):
도커를 언급하는 패키지가 있으면 어떻게 되는지 확인하려면 다음 문제를 해결합니다.
dpkg -l|grep docker
일치만 따르는 경우 아래의 도커가 관련 없는 패키지가 설치되어 있지 않습니다.
도커 - KDE3/GNOME2 도클렛 애플리케이션용 시스템 트레이
위에 보면 잘못된 도커이므로 제거합시다.
sudo apt-get 도커 제거 # 잘못된 도커 제거
다음과 유사한 것이 보이면 도커가 설치되어 있습니다.
dpkg -l|grep docker
ii docker-ce 5:19.03.13~3-0~ubuntu-focal amd64 Docker: the open-source application container engine
ii docker-ce-cli 5:19.03.13~3-0~ubuntu-focal amd64 Docker CLI: the open-source application container engine
- 패키지 - Ubuntu 패키지docker.io 사용하지 않습니다.
대신 다음을 실행하여 Linux에 최신 버전의 도커를 설치합니다.
sudo apt-get install docker-ce
아래는 설치 명령을 실행하는 또 다른 방법입니다.
sudo curl -sSL https://get.docker.com/ | sh
# sudo curl -sSL https://test.docker.com | sh # get dev pipeline version
다음은 일반적인 출력(Ubuntu 16.04)입니다.
apparmor is enabled in the kernel and apparmor utils were already installed
+ sudo -E sh -c apt-key adv --keyserver hkp://ha.pool.sks-keyservers.net:80 --recv-keys 58118E89F3A912897C070ADBF76221572C52609D
Executing: /tmp/tmp.rAAGu0P85R/gpg.1.sh --keyserver
hkp://ha.pool.sks-keyservers.net:80
--recv-keys
58118E89F3A912897C070ADBF76221572C52609D
gpg: requesting key 2C52609D from hkp server ha.pool.sks-keyservers.net
gpg: key 2C52609D: "Docker Release Tool (releasedocker) <docker@docker.com>" 1 new signature
gpg: Total number processed: 1
gpg: new signatures: 1
+ break
+ sudo -E sh -c apt-key adv -k 58118E89F3A912897C070ADBF76221572C52609D >/dev/null
+ sudo -E sh -c mkdir -p /etc/apt/sources.list.d
+ dpkg --print-architecture
+ sudo -E sh -c echo deb [arch=amd64] https://apt.dockerproject.org/repo ubuntu-xenial main > /etc/apt/sources.list.d/docker.list
+ sudo -E sh -c sleep 3; apt-get update; apt-get install -y -q docker-engine
Hit:1 http://repo.steampowered.com/steam precise InRelease
Hit:2 http://download.virtualbox.org/virtualbox/debian xenial InRelease
Ign:3 http://dl.google.com/linux/chrome/deb stable InRelease
Hit:4 http://dl.google.com/linux/chrome/deb stable Release
Hit:5 http://archive.canonical.com/ubuntu xenial InRelease
Hit:6 http://mirror.cc.columbia.edu/pub/linux/ubuntu/archive xenial InRelease
Hit:7 http://mirror.cc.columbia.edu/pub/linux/ubuntu/archive xenial-updates InRelease
Hit:8 http://ppa.launchpad.net/me-davidsansome/clementine/ubuntu xenial InRelease
Ign:9 http://repo.mongodb.org/apt/debian wheezy/mongodb-org/3.2 InRelease
Hit:10 http://mirror.cc.columbia.edu/pub/linux/ubuntu/archive xenial-backports InRelease
Hit:11 http://repo.mongodb.org/apt/debian wheezy/mongodb-org/3.2 Release
Hit:12 http://mirror.cc.columbia.edu/pub/linux/ubuntu/archive xenial-security InRelease
Hit:14 http://ppa.launchpad.net/numix/ppa/ubuntu xenial InRelease
Ign:15 http://linux.dropbox.com/ubuntu wily InRelease
Ign:16 http://repo.vivaldi.com/stable/deb stable InRelease
Hit:17 http://repo.vivaldi.com/stable/deb stable Release
Get:18 http://linux.dropbox.com/ubuntu wily Release [6,596 B]
Get:19 https://apt.dockerproject.org/repo ubuntu-xenial InRelease [20.6 kB]
Ign:20 http://packages.amplify.nginx.com/ubuntu xenial InRelease
Hit:22 http://packages.amplify.nginx.com/ubuntu xenial Release
Hit:23 https://deb.opera.com/opera-beta stable InRelease
Hit:26 https://deb.opera.com/opera-developer stable InRelease
Get:28 https://apt.dockerproject.org/repo ubuntu-xenial/main amd64 Packages [1,719 B]
Hit:29 https://packagecloud.io/slacktechnologies/slack/debian jessie InRelease
Fetched 28.9 kB in 1s (17.2 kB/s)
Reading package lists... Done
W: http://repo.mongodb.org/apt/debian/dists/wheezy/mongodb-org/3.2/Release.gpg: Signature by key 42F3E95A2C4F08279C4960ADD68FA50FEA312927 uses weak digest algorithm (SHA1)
Reading package lists...
Building dependency tree...
Reading state information...
The following additional packages will be installed:
aufs-tools cgroupfs-mount
The following NEW packages will be installed:
aufs-tools cgroupfs-mount docker-engine
0 upgraded, 3 newly installed, 0 to remove and 17 not upgraded.
Need to get 14.6 MB of archives.
After this operation, 73.7 MB of additional disk space will be used.
Get:1 http://mirror.cc.columbia.edu/pub/linux/ubuntu/archive xenial/universe amd64 aufs-tools amd64 1:3.2+20130722-1.1ubuntu1 [92.9 kB]
Get:2 http://mirror.cc.columbia.edu/pub/linux/ubuntu/archive xenial/universe amd64 cgroupfs-mount all 1.2 [4,970 B]
Get:3 https://apt.dockerproject.org/repo ubuntu-xenial/main amd64 docker-engine amd64 1.11.2-0~xenial [14.5 MB]
Fetched 14.6 MB in 7s (2,047 kB/s)
Selecting previously unselected package aufs-tools.
(Reading database ... 427978 files and directories currently installed.)
Preparing to unpack .../aufs-tools_1%3a3.2+20130722-1.1ubuntu1_amd64.deb ...
Unpacking aufs-tools (1:3.2+20130722-1.1ubuntu1) ...
Selecting previously unselected package cgroupfs-mount.
Preparing to unpack .../cgroupfs-mount_1.2_all.deb ...
Unpacking cgroupfs-mount (1.2) ...
Selecting previously unselected package docker-engine.
Preparing to unpack .../docker-engine_1.11.2-0~xenial_amd64.deb ...
Unpacking docker-engine (1.11.2-0~xenial) ...
Processing triggers for libc-bin (2.23-0ubuntu3) ...
Processing triggers for man-db (2.7.5-1) ...
Processing triggers for ureadahead (0.100.0-19) ...
Processing triggers for systemd (229-4ubuntu6) ...
Setting up aufs-tools (1:3.2+20130722-1.1ubuntu1) ...
Setting up cgroupfs-mount (1.2) ...
Setting up docker-engine (1.11.2-0~xenial) ...
Processing triggers for libc-bin (2.23-0ubuntu3) ...
Processing triggers for systemd (229-4ubuntu6) ...
Processing triggers for ureadahead (0.100.0-19) ...
+ sudo -E sh -c docker version
Client:
Version: 1.11.2
API version: 1.23
Go version: go1.5.4
Git commit: b9f10c9
Built: Wed Jun 1 22:00:43 2016
OS/Arch: linux/amd64
Server:
Version: 1.11.2
API version: 1.23
Go version: go1.5.4
Git commit: b9f10c9
Built: Wed Jun 1 22:00:43 2016
OS/Arch: linux/amd64
If you would like to use Docker as a non-root user, you should now consider
adding your user to the "docker" group with something like:
sudo usermod -aG docker stens
Remember that you will have to log out and back in for this to take effect!
다음은 위 기술에 포함된 기본 설치 지침입니다.하나 이상의 라이너는 다음과 같습니다.
https://docs.docker.com/engine/installation/linux/ubuntulinux/
설치가 완료되면 다음을 실행하여 어떤 도커 패키지가 설치되었는지 확인할 수 있습니다.
dpkg -l|grep docker
ii docker-ce 5:19.03.13~3-0~ubuntu-focal amd64 Docker: the open-source application container engine
ii docker-ce-cli 5:19.03.13~3-0~ubuntu-focal amd64 Docker CLI: the open-source application container engine
이제 도커 업데이트는 당신이 발행할 때 설치될 것입니다.
sudo apt-get update
sudo apt-get upgrade
을 보다.
ls -latr /etc/apt/sources.list.d/*docker*
-rw-r--r-- 1 root root 202 Jun 23 10:01 /etc/apt/sources.list.d/docker.list.save
-rw-r--r-- 1 root root 71 Jul 4 11:32 /etc/apt/sources.list.d/docker.list
cat /etc/apt/sources.list.d/docker.list
deb [arch=amd64] https://apt.dockerproject.org/repo ubuntu-xenial main
또는 보다 일반적으로
cd /etc/apt
grep -r docker *
sources.list.d/docker.list:deb [arch=amd64] https://download.docker.com/linux/ubuntu focal test
sudo apt-get install docker # DO NOT do this
Ubuntu의 다른 라이브러리입니다.
사용하다sudo apt-get install docker-ce올바른 도커를 설치합니다.
쉬운 방법으로 도커를 설치하려면.
그냥 입력:
$sudo apt install docker.io
설치가 시작됩니다.
작동 여부를 확인하려면 다음을 입력합니다.
$docker
저장소 설정
Ubuntu 14.04/16.04/16.10/17.04의 경우:
sudo add-apt-repository "deb [arch=amd64] \
https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable"
Ubuntu 17.10의 경우:
sudo add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/ubuntu zesty stable"
Docker의 공식 GPG 키 추가:
$ curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add -
그런 다음 설치
$ sudo apt-get update && sudo apt-get -y install docker-ce
언급URL : https://stackoverflow.com/questions/30379381/docker-command-not-found-even-though-installed-with-apt-get
'programing' 카테고리의 다른 글
| jQuery agax - statusCode() 콜백이 호출될 때 오류() 콜백 방지 (0) | 2023.08.31 |
|---|---|
| Mariadb 드라이버 Aurora IAM 자격 증명 유형 액세스가 사용자에 대해 거부되었습니다(암호 사용: YES). (0) | 2023.08.31 |
| 로컬 호스트에 대해 신뢰할 수 있는 자체 서명 SSL 인증서 생성(Express/Node와 함께 사용) (0) | 2023.08.31 |
| Javascript/HTML을 이용한 간단한 이미지 업로드 방법 (0) | 2023.08.31 |
| Mysql/Mariadb에서 중첩된 Json 업데이트 (0) | 2023.08.31 |