My morning so far has been banging my head against trying to get the docker installation to work, so far I have had no luck.
The guide I have been following: https://docs.docker.com/install/linux/docker-ce/ubuntu/
Here is the steps of what happens.
First:
sudo apt-get remove docker docker-engine docker.io containerd runc
Which is good! The next step is a sudo apt-get update which returns something less good. A lot of documentation I have read does not seem to help me solve this, so I plug on to see if something will correct this later.
Third step is
sudo apt-get install apt-transport-https ca-certificates curl gnupg-agent software-properties-common
No issues here.
Fourth step is the docker fingerprint key
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add -
Which just outputs OK
Fifth step I do is the sudo apt-key fingerprint 0EBFCD88 which outputs the key as it is shown in the docker installation documentation.
Sixth step is the repository:
sudo add-apt-repository \
"deb [arch=amd64] https://download.docker.com/linux/ubuntu \
$(lsb_release -cs) \
stable"
No output is shown just brings me to a new command line.
Seventh step is sudo apt-get update which shows the same output as in step 2.
Eigth step is the actual install. sudo apt-get install docker-ce docker-ce-cli containerd.io
Which outputs:
I am not sure of what files to edit. But every line is spelled correctly and it still throws issues my way and I am at a loss. If anyone has any tips thatd be fantastic.
If you are not sure which steps error, I suggest you to ease the process of the docker install using official convenience script, see this:
Main steps as next:
$ curl -fsSL https://get.docker.com -o get-docker.sh
$ sudo sh get-docker.sh
Super simple way to install, as this is a common problem:
Download the most recent docker-ce, docker cli and container.d file from here:
https://download.docker.com/linux/ubuntu/dists/xenial/pool/stable/amd64/
Then just run dpkg -i <containerd package name> <docker-ce package name> <docker cli package name>
That's it, Docker away
sometimes it is blocked through the DNS, You can try by changing DNS address to 8.8.8.8.
you can change DNS address through /etc/resolve.conf temporarily
or if you need permanent you can change here /etc/resolvconf/resolv.conf.d/base
Related
I have installed some packages (Docker, Kubeadm, Kubelet, Kubectl) for my Kubernetes cluster on Ubuntu 18.04 LTS.
I don't want these packages to get auto updated because there will be some issue arises between them when the update happens between one another.
I just want to update manually when they are stable.
What is the correct command for stop packages update automatically?
Commands I have used to install them on Ubuntu 18.04
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add -
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 -y docker-ce=18.06.1~ce~3-0~ubuntu
curl -s https://packages.cloud.google.com/apt/doc/apt-key.gpg | sudo apt-key add -
cat << EOF | sudo tee /etc/apt/sources.list.d/kubernetes.list
deb https://apt.kubernetes.io/ kubernetes-xenial main
EOF
sudo apt-get update
sudo apt-get install -y kubelet=1.12.7-00 kubeadm=1.12.7-00 kubectl=1.12.7-00
Motivation: You don't want to take any risks over sensitive packages on your linux machine (It happens when your application is in production and customers use it, or some important task running inside, newer version can break changes and accidentally can cause a downtime). In this situation - you want to pin specific versions to your packages and make sure no upgrade happens without explicit action and approval from your side.
Solution: You should disable the unattended-upgrades feature and pin your package into the current version you use (in other words - keep this version).
step 1: disable automatic upgrade (aka unattended-upgrades)
$ sudo vim /etc/apt/apt.conf.d/20auto-upgrades
#edit these lines - which disabling the upgrade feature.
APT::Periodic::Update-Package-Lists "1";
APT::Periodic::Unattended-Upgrade "0";
step 2: hold and freeze the specific package you want prevent from self upgrading:
sudo apt-mark hold <package-name>
You can use the hold status for a package (or set of packages) to not involve it upgrades. That gives you the more fine-tuned ability to decide on a per-package basis what should, or should not, upgrade. Very helpful during known digressions, bugs, and subtle changes in behaviour.
From the manual page for dpkg and edited / indented:
--get-selections [package-name-pattern...]
Get list of package selections, and write it to stdout. Without a pattern,
non-installed packages (i.e. those which have been previously purged) will
not be shown.
--set-selections
Set package selections using file read from stdin. This file should be in
the format “package state”, where state is one of install, hold, deinstall
or purge. Blank lines and comment lines beginning with ‘#’ are also
permitted.
The available file needs to be up-to-date for this command to be useful,
otherwise unknown packages will be ignored with a warning. See the
--update-avail and --merge-avail commands for more information.
The format is arguably a little weird -- but this is very powerful and helpful. I relied on it a few times during my twenty-five years (!!) with Debian/Ubuntu. I may have a shell script helper somwhere but I may need to dig.
Find of the day :). Ubuntu apt gives you the command to hold the auto update of the package. Thanks to Dirk for giving me the hint.
sudo apt-mark hold docker-ce kubelet kubeadm kubectl
apt doesn't have yum like flags --enable-repo and --disablerepo while performing install or update. A way to manage repos is shown here
But for your case the way you have added the repositories they have been appended to /etc/apt/sources.list therefore you can use sed to comment out the repository lines which you have added to install docker and kubernetes.
Note: you should comment out lines after installation and before performing sudo apt-get update
Example:To disable docker repo:
sed -i 's/^deb.*docker.*/# &/g' /etc/apt/sources.list
Enable the docker repo for manual update:
sed -i '/^# deb .*docker.*/s/^# //' /etc/apt/sources.list
I have a new installation of Linux Mint 18.1 with Ubuntu 16.04.
I have installed Node 6.10.0.
When doing the command that indicates the documentation of Yarn:
sudo apt-get update && sudo apt-get install yarn
It says "could not find yarn package"
I must do something else, because in the documentation I do not see anything about it.
Thank you.
On Ubuntu Linux, you can install Yarn via Debian package repository. You will first need to configure the repository:
curl -sS https://dl.yarnpkg.com/debian/pubkey.gpg | sudo apt-key add -
echo "deb https://dl.yarnpkg.com/debian/ stable main" | sudo tee /etc/apt/sources.list.d/yarn.list
Then you can simply:
sudo apt-get update && sudo apt-get install yarn
More information here
I was unable to install Yarn on Ubuntu 16.04 using the accepted answer but found it easy with npm:
npm install -g yarn
Then check install / version with
yarn --version
See on Installation | Yarn | Linux tab
There are instructions for several linux distributions
Here are more details about the official install instruction.
apt-key command gets the public authentication key for software integration check.
deb https://dl.yarnpkg.com/debian/ stable main is the Ubuntu repository containing yarn. Look at OP's screenshot, the top 10 lines list existing repositories to search for packages, but there is no yarn's one. So we need to add the repository by creating file /etc/apt/sources.list.d/yarn.list.
After the above two steps, issue apt/apt-get command to add yarn like usual Ubuntu packages.
Be careful when using &&. I get the same error when running sudo apt-get update, which prevents terminal from running sudo apt-get install yarn. I was able to successfully install yarn on Ubuntu 16.04 by running these commands separately (without using &&)
In Ubuntu or Linux you can install yarn using terminal ,But before installing You will first need to configure the repository, for that run the below commands
sudo apt install curl
curl -sS https://dl.yarnpkg.com/debian/pubkey.gpg | sudo apt-key add -
echo "deb https://dl.yarnpkg.com/debian/ stable main" | sudo tee /etc/apt/sources.list.d/yarn.list
after setting up the repository you can simply install yarn using below command
sudo apt-get update && sudo apt-get install yarn
Once the installation gets completed you can check the version using following command
yarn --version
for more details go to yarn documentation
I am trying to install docker in Ubuntu 16.04. I am following this link for docker installation. I am ending up with Unable to locate package docker-engine
My current kernal version - 4.4.0-38-generic
Ubuntu version - 16.04
The docker package already inside Ubuntu is called docker.io [1] so just do
sudo apt-get install docker.io
But if you follow that link you gave and do steps 7, 8, 9 then your installation will know about the package at the docker repo and also find docker-engine.
Your call. I run the Ubuntu version (currently 0.11.2 on Ubuntu 16.04) on some machines, and the one from Docker on others (as I was curious about some 0.12 features). Both will work just fine.
[1] As docker is used for a desktop launcher application 'docking' icons.
I faced the same issue on AWS-EC2 with ubuntu-18.04 server...
running apt-get update does the trick for me....
Once update runs fine then run apt-get install docker.io
Docker-compose-plugin is put into the docker.io repo.
Running sudo apt install docker.io ,or apt-get in older Ubuntu versions, will also get you the files you need. First you will need to run update to make sure you have most recent versions. sudo apt update
The main solution which solved most of the issues in docker is installing 64-bit version of ubuntu. I was running with 32-bit(i686). Hope it helps ! !
I wasn't able to install docker with the current other solutions but managed to get rid of the "Unable to locate package docker-engine" error with a solution mentioned on the GitHub repo issues (issue of May 31, 2020).
The solution was to run these commands:
sudo apt update
sudo apt install apt-transport-https ca-certificates curl gnupg-agent software-properties-common
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add -
sudo add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable"
sudo apt update
sudo apt install docker-ce docker-ce-cli containerd.io
I'm running a virtual machine in Windows Azure with the prebuild image for Ubuntu 14.04 LTS.
When I want to install Docker.io like described here:
http://blog.docker.io/2014/04/docker-in-ubuntu-ubuntu-in-docker/
The installation works but when i`m running:
sudo docker.io pull ubuntu
An error will be thrown:
Cannot connect to the Docker daemon. Is docker -d running on this host?
Can anyone help or has the similar problem?
P.S.: Can anyone with a high reputation create a Tag for Ubuntu-14.04?
Evidently the docker daemon is not running. You wanna check /etc/default/docker.conf for proper configuration and issue
sudo service docker.io start
or
sudo service docker start
depending on how they called the service
Adding myself to the docker group:
sudo usermod -a -G docker myuser
and rebooting the machine worked for me. This solution is discussed in: https://github.com/docker/docker/issues/5314
On Ubuntu 14.04, the docker.io package installs Docker 0.9.1.
According to the documentation, to install the current version use these commands:
$ sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys 36A1D7869245C8950F966E92D8576A8BA88D21E9
$ sudo sh -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
There is also a simple script available to help with this process:
$ curl -s https://get.docker.io/ubuntu/ | sudo sh
Alternatively, check the azure-docker-registry project for an example of how to automate Azure provisioning and Docker container deployment. For instance, this Ansible playbook:
- name: create docker data directory
file: path=/mnt/data/docker state=directory
- name: store docker files in data disk
file: src=/mnt/data/docker dest=/var/lib/docker state=link
- name: add repository key
command: creates=/etc/apt/sources.list.d/docker.list apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys 36A1D7869245C8950F966E92D8576A8BA88D21E9
- name: copy repository source file
copy: src=docker.list dest=/etc/apt/sources.list.d/docker.list
- name: install docker package
apt: name=lxc-docker update_cache=yes state=present
Also make sure to symlink the docker.io binary to docker to use the tutorials/documentation without rewriting every command.
ln -s /usr/bin/docker.io /usr/bin/docker
Run docker -d to see if it shows any error messages.
If apparmor is missing install it with sudo apt-get install apparmor
Then sudo service docker start
Hard to say but sometime official docker installation procedure fails on Ubuntu 14.04.
One can simply install docker using below given commands [Quick and Dirty]
sudo apt-get update
sudo apt-get -y install docker.io
I followed the Google instructions to set up gsutil. It states that after runnig 'gsutil config' in terminal I should see:
This script will create a boto config file at /.boto
containing your credentials, based on your responses to the following
questions.
Please navigate your browser to the following URL:
<http://urlto/authorization/dialog> In your browser you should see a
page that requests you to authorize gsutil to access Google Cloud
Storage on your behalf. After you approve, an authorization code will
be displayed.
Enter the authorization code:
however I get this response instead:
root#myserver# gsutil config
No command was given.
Choose one of -b, -d, -e, or -r to do something.
Try `/usr/bin/gsutil --help' for more information.
I am using gsutil version 3 on Ubuntu, and trying suggested flags with /usr/bin/gsutil does not give any sensible result.
Any suggestions?
Thanks
Pretty sure you have the "configure and manage GrandStream BudgeTone 100 VOIP and GS2000 phones" package installed, which is also called gsutil. So that is likely causing the issue. If you don't need the BudgeTone tools then remove them. Or, explicitly invoke the google tools by using the full path to your home directory where gstools was untarred/unzipped.
sudo apt-get remove --purge gsutil
sudo easy_install -U pip
sudo pip2 install gsutil
gsutil ls gs://uspto-pair/applications/0800401*
gsutil -config
This happens if you try to install gsutil using apt install gsutil which installs "GrandStream" manager instead of Google's gsutil.
First, you need to uninstall the wrong package:
sudo apt-get remove --purge gsutil
Then, you can install gsutil according to the installation guide.
Here is how you can do it in Ubuntu:
sudo apt-get install apt-transport-https ca-certificates gnupg
echo "deb [signed-by=/usr/share/keyrings/cloud.google.gpg] https://packages.cloud.google.com/apt cloud-sdk main" | sudo tee -a /etc/apt/sources.list.d/google-cloud-sdk.list
curl https://packages.cloud.google.com/apt/doc/apt-key.gpg | sudo apt-key --keyring /usr/share/keyrings/cloud.google.gpg add -
sudo apt-get update && sudo apt-get install google-cloud-cli