As the Docker team advances with new features frequently, the Amazon Linux AMI repo (amzn-updates) Docker package is not always up to date, hence some latest features are not immediately available (e.g. when installing Docker with sudo yum install -y docker).
How can I install an specific version of Docker on Amazon Linux AMI?
Are there pros/cons if Installing it with amazon package manager vs manually?
Thanks in advance.
As Docker Introduces two different flavors (CE and EE) the best and easy way of installing Docker on any system. please run the below command and you do not have to do any thing.
wget -qO- https://get.docker.com/ | sh
if you want to install a specific version of a docker, you can run below command to find what all version of docker is present.
apt-cache madison docker-ce #(for ubuntu)
yum list docker-ce.x86_64 --showduplicates | sort -r #(for centos)
then select the proper version and place it in below command.
wget -qO- https://get.docker.com/ | sed 's/docker-ce/docker-ce=<DOCKER_VERSION/' | sh
Related
We are using Azure Pipelines with build agents using Ubuntu 18.04 as OS.
I am currently trying to update the Nodejs version in our pipelines from 16 to 18. Installation of Nodejs is simple enough by using the NodeTool task from Azure Pipelines with versionSpec: "18.x".
However upon using Nodejs afterwards it prompts me for a missing dependency:
node: /lib/x86_64-linux-gnu/libc.so.6: version `GLIBC_2.28' not found (required by node)\
I can even replicate this behavior using docker with the following instructions
docker pull ubuntu:18.04
docker run -it {IMAGE-ID}
# console switches to TTY session for running container…
apt update
apt install curl
curl -fsSL https://deb.nodesource.com/setup_18.x | bash
apt-get install -y nodejs
# checking the node version generates the error above
node -v
The question here might be a little bit overboard, but I am not used to working with linux systems.
Can i easily resolve this dependency for nodejs?
Or what would be the general approach here to install the missing dependency?
This message comes during the installation process you mentioned above.
## Run sudo apt-get install -y nodejs` to install Node.js 18.x and npm
## You may also need development tools to build native addons:
sudo apt-get install gcc g++ make
## To install the Yarn package manager, run:
curl -sL https://dl.yarnpkg.com/debian/pubkey.gpg | gpg --dearmor | sudo tee /usr/enter code hereshare/keyrings/yarnkey.gpg >/dev/null
echo "deb [signed-enter code hereby=/usr/share/keyrings/yarnkey.gpg] https://dl.yarnpkg.com/debian stable main" | sudo tee /etc/apt/sources.list.denter code here/yarn.list
sudo apt-get update && sudo apt-get install yarn
I tried that, but still same error.
So after a little research it seams that node 18 and ubuntu 18 are not combatible.
https://github.com/nodesource/distributions/issues/1392
If you google the error you will find more about this issue.
Updating to ubuntu 20.04 should fix the problem.
If you dont need ubuntu for some other reasons than nodejs, i would suggest you to try node:18-alpine. (one of the ufficial nodejs images). Alpine is much more lightweigth than ubuntu.
I need to install nodejs version8.11.2 into my ubuntu machine. my ubuntu versions is 18.04.
In my machine installed node version is 10.0. Although I use 'sudo apt-get remove nodejs' command to uninstall nodeJS, it is not removing. When i run node -v, it gives the same version.enter image description here
enter image description here
Install Node.js from the NodeSource repository
curl -sL https://deb.nodesource.com/setup_12.x | sudo -E bash -
The command above :
Adds the NodeSource signing key to your system.
Creates an apt sources repository file.
Installs all necessary packages.
Refreshes the apt cache.
Then you can do : sudo apt install nodejs
At the time of writing this 12.4.2 is the current latest Node.js version.
You can install version 10.16.0 by changing setup_12.x to setup_10.x in the first command.
I am trying to create a docker image from a Debian environment and I am unable to obtain NodeJS ver. 6.*.
I am running: RUN curl -sL https://deb.nodesource.com/setup_6.x | bash - && apt-get install -yq nodejs build-essential
in my dockerfile but the nodejs version is still 4.8.2. I've tried doing apt-get update but the version stays at 4.8.2 for nodejs.
If you want to download the Node directly (because e.g. you need to use this specific Debian base image for some reason) then you may try to get the official Node package instead of the one that you're using with something like:
wget https://nodejs.org/dist/v6.7.0/node-v6.7.0-linux-x64.tar.gz
tar xzvf node-v6.7.0-linux-x64.tar.gz
sudo chown -Rv root.root node-v6.7.0-linux-x64
sudo cp -Rvi node-v6.7.0-linux-x64/{bin,include,lib,share} /usr/local
Just change the version to the one that you want. See my tutorial for more options and more ways to do it:
https://gist.github.com/rsp/edf756a05b10f25ee305cc98a161876a
Another options is to use nvm which is very solid Node version manager:
https://github.com/creationix/nvm#readme
If you can use some other Docker base image then consider one that already has the correct version of Node included, like https://hub.docker.com/_/node/ as advised by tier1 in the comments.
I came across a debian application by the name JavaPackage which can create a debian installation file (.deb) form a java binary (.tar.gz) which you can then install using dpkg -i application_name.deb. With Ubuntu being a debian-based linux distribution, it is possible that it can be installed on ubuntu as well.
How do I go about installing it on Ubuntu/Kubuntu 16.04.2 LTS?
java-package is available in the official ubuntu repositories. All you need to do is update the repository with the latest version then install it as shown below:
sudo apt-get update
sudo apt-get install java-package
I'm trying to install Puppet on RedHat Linux Version 7.
The instructions say you need to install an "optional channel".
Can someone provide directions on how to do this? I want to install Puppet. I tried to install Puppet Master without the optional channel. The main thing that is wrong is that I cannot start puppetmaster.
When I try and run:
/etc/init.d/puppetmaster restart
But I get this:
-bash: /etc/init.d/puppetmaster: No such file or directory
From reading over the docs:
subscription-manager repos --enable=rhel-7-server-optional-rpms
(From the RedHat Docs)
Then, to install Puppetserver:
sudo rpm -ivh http://yum.puppetlabs.com/puppetlabs-release-el-7.noarch.rpm
sudo yum install puppet-server
From the Puppet Docs
That should work.
This is how I install the release package of the repository, the Puppet repository in this particular example:
BASEARCH=$(uname -i);
RELEASE=$(cat /etc/redhat-release | sed -rn '/(Final|release)/s/^[^0-9]*|[^0-9.]*$//gp' | sed -e 's/[.].*//');
rpm -Uhv http://yum.puppetlabs.com/el/$RELEASE/products/$BASEARCH/$(curl -s http://yum.puppetlabs.com/el/$RELEASE/products/$BASEARCH/ | grep puppetlabs-release | tail -n1 | sed 's%.*>\(.*.release-.*noarch.rpm\)<.*%\1%');
This code installs the latest version of the release package for the OS version you are running on. You do not need to know the precise release number...
Than install the Puppet server
yum install puppet-server