How to upgrade cURL to 7.71.0 in a docker image with centos7.x as the base - docker

Title is pretty self explanatory, when using yum upgrade curl it doesn't upgrade curl beyond 7.29.0 witch is an issue because I need to use the --retry-all-errors flag in the docker images startup script.

Running the below commands solved my issue
sudo rpm -Uvh http://www.city-fan.org/ftp/contrib/yum-repo/rhel7/x86_64/city-fan.org-release-2-2.rhel7.noarch.rpm
sudo yum install -y yum-utils
sudo yum-config-manager --disable city-fan.org
sudo yum -y --enablerepo=city-fan.org install libcurl libcurl-devel
If using the city-fan repo is an issue for you, you can also use this script to install directly from curl.
sudo yum install wget gcc openssl-devel make -y
wget https://curl.haxx.se/download/curl-${VERSION}.tar.gz
tar -xzvf curl-${VERSION}.tar.gz
rm -f curl-${VERSION}.tar.gz
cd curl-${VERSION}
./configure --prefix=/usr/local --with-ssl
make
sudo make install
sudo ldconfig

Related

install Erlang 17.3 on Ubuntu 18

I was trying many ways in order to install Erlang 17.3 on Ubuntu 18. So far I came up with this solution you can read below:
For installation Erlang 17.3 on Ubuntu 18 you should do the following things:
Enter in the console next command:
Download the tar file:
wget http://erlang.org/download/otp_src_17.3.tar.gz
Extract the tar file in directory where you download the otp_src_17.3.tar.gz:
cd '/home/yaroslav/otp_src_17.3'
tar -zxf otp_src_17.3.tar.gz
set export ERL_TOP your 'pwd' path:
export ERL_TOP=pwd
Basic dependencies:
sudo apt-get install autoconf libncurses-dev build-essential
Other applications dependencies
sudo apt-get install m4
sudo apt-get install unixodbc-dev
sudo apt-get install libssl-dev
sudo apt-get -y install libssh-dev
sudo apt-get install libwxgtk3.0-dev libglu-dev
sudo apt-get install fop xsltproc
sudo apt-get install g++
sudo apt-get install default-jdk
sudo apt-get install xsltproc fop
Or all dependencies in one line:
apt-get -y install build-essential autoconf m4 libncurses5-dev libwxgtk3.0-dev libgl1-mesa-
dev libglu1-mesa-dev libpng-dev libssh-dev unixodbc-dev xsltproc fop g++ default-jdk
install openssl version 1.0.2 for Ubuntu 18 (different version SSL is not compatible):
curl https://www.openssl.org/source/openssl-1.0.2l.tar.gz | tar xz && cd openssl-1.0.2l &&
sudo ./config && sudo make && sudo make install
Configure and build:
./configure --with-ssl='/home/yaroslav/otp_src_17.3/openssl-1.0.2l'
sudo make
sudo make install
For installing older versions of Erlang and working with several at the same time I would recommend using kerl
If you need more fancy features you could also head for asdf which has a Erlang plugin (which runs kerl under the hood)

Unable to use sudo commands within Docker, "bash: sudo: command not found" is displayed

I have installed TensorFlow using the following command
docker run -it b.gcr.io/tensorflow/tensorflow:latest-devel
and I need to set up TensorFlow Serving on a windows machine. I followed the instructions and while running the below-mentioned sudo command while installing TensorFlow Serving dependencies:
sudo apt-get update && sudo apt-get install -y \
build-essential \
curl \
git \
libfreetype6-dev \
libpng12-dev \
libzmq3-dev \
pkg-config \
python-dev \
python-numpy \
python-pip \
software-properties-common \
swig \
zip \
zlib1g-dev
The following error is displayed:
bash: sudo: command not found
docker comes along with root it doesnt require sudo.
BTW if you want sudo in docker if you want to install sudo,
try this,
apt-get update && \
apt-get -y install sudo
now you can use sudo along with your command in docker...
Docker images typically do not have sudo, you are already running as root by default. Try
apt-get update && apt-get install -y build-essential curl git libfreetype6-dev libpng12-dev libzmq3-dev pkg-config python-dev python-numpy python-pip software-properties-common swig zip zlib1g-d
If you wish to not run as root, see the Docker documentation on the User command.
We don't want to weaken the security of the container by installing sudo in it. But we also don't want to change existing scripts that work on normal machines just so that they work in docker, which doesn't need the sudo.
Instead, we can define a dummy bash script to replace sudo, which just executes the arguments without elevating permissions, and is only defined inside the docker image.
Add this to your Dockerfile:
# Make sudo dummy replacement, so we don't weaken docker security
RUN echo "#!/bin/bash\n\$#" > /usr/bin/sudo
RUN chmod +x /usr/bin/sudo

Can't install s3fs-fuse(yum fuse-devel version issue) and can't install libfuse(./config missing issue)

I am trying to get s3fs-fuse installed on my Docker container. Here is my Dockerfile so far.
FROM centos:centos6
RUN yum -y update; yum clean all; \
yum groupinstall -y "Web Server" "MySQL Database" "PHP Support"; \
service httpd start; \
chkconfig httpd on;
RUN yum install -y openssh; \
yum install -y openssh-clients;
ADD ssh/ /root/.ssh/
RUN chmod 600 /root/.ssh/*; \
touch /root/.ssh/known_hosts; \
ssh-keyscan github.com >> /root/.ssh/known_hosts;
RUN yum install -y git;
RUN yum install -y autoconf libtool gcc libstdc++-devel curl-devel mailcap; \
yum install -y automake fuse-devel gcc-c++ git libcurl-devel libxml2-devel make openssl-devel;
Then after following the instructions at https://github.com/s3fs-fuse/s3fs-fuse I perform the following commands:
git clone https://github.com/s3fs-fuse/s3fs-fuse.git
cd s3fs-fuse
./autogen.sh
./configure
Then I get this:
checking s3fs build with NSS... no
checking for pkg-config... /usr/bin/pkg-config
checking pkg-config is at least version 0.9.0... yes
checking for common_lib_checking... configure: error: Package requirements (fuse >= 2.8.4 libcurl >= 7.0 libxml-2.0 >= 2.6) were not met:
Requested 'fuse >= 2.8.4' but version of fuse is 2.8.3
Consider adjusting the PKG_CONFIG_PATH environment variable if you
installed software in a non-standard prefix.
Alternatively, you may set the environment variables common_lib_checking_CFLAGS
and common_lib_checking_LIBS to avoid the need to call pkg-config.
See the pkg-config man page for more details.
So, I presume I need to get the right fuse version as yum fuse-devel isn't cutting it. So I go to https://github.com/libfuse/libfuse and follow the instructions there with do the following:
git clone https://github.com/libfuse/libfuse.git;
cd libfuse;
./configure
Then I get this issue:
bash: ./configure: No such file or directory
I have been all around the internet and have tried the whole autoconf and autoreconf -i thing that lead to m4 directory missing errors. I have also tried adding the --prefix=/your/chosen/directory to the ./configure --prefix=/your/chosen/directory command that lead me no where. No luck with a super sad face.
Run makeconf.sh in your libfuse clone which creates configure.

How to install a local rpm file when building docker instance?

I have following docker file, I want to specifically install a rpm file that is available on my disk as I am building docker instance. My invocation of rpm install looks like this. Command
RUN rpm -i chrpath-0.13-14.el7.x86_64.rpm fails.
Is there a way to install rpm file available locally to new Docker instance?
FROM centos:latest
RUN yum -y install yum-utils
RUN yum -y install python-setuptools
RUN easy_install supervisor
RUN mkdir -p /var/log/supervisor
RUN yum -y install which
RUN yum -y install git
# Basic build dependencies.
RUN yum -y install autoconf build-essential unzip zip
# Gold linker is much faster than standard linker.
RUN yum -y install binutils
# Developer tools.
RUN yum -y install bash-completion curl emacs git man-db python-dev python-pip vim tar
RUN yum -y install gcc gcc-c++ kernel-devel make
RUN yum -y install swig
RUN yum -y install wget
RUN yum -y install python-devel
RUN yum -y install ntp
RUN rpm -i chrpath-0.13-14.el7.x86_64.rpm
Put this line before your rpm -i command:
ADD /host/abs/path/to/chrpath-0.13-14.el7.x86_64.rpm /chrpath-0.13-14.el7.x86_64.rpm
Then you'll be able to do
RUN rpm -i chrpath-0.13-14.el7.x86_64.rpm
As and addendum to what others have written here, rather than using:
RUN rpm -i xyz.rpm
You might be better off doing this:
RUN yum install -y xyz.rpm
The latter has the advantages that (a) it checks the signature, (b) downloads any dependencies, and (c) makes sure YUM knows about the package. This last bit is less important than the other two, but it's still worthwhile.
Suppose you have your Dockerfile available at /opt/myproject/. Then first you have to put rpm inside /opt/myproject and then add
Add /xyz.rpm /xyz.rpm
RUN rpm -i xyz.rpm

Can ejabberd be installed on Google Compute Engine?

Can ejabberd be installed on Google Compute Engine? Will there be any issues with using ejabberd on Compute Engine? I have looked but cannot find any references to anyone trying this before. Grateful for any help.
Yes. Compute Engine gives you VMs. You can put whatever you want on them, such as Erlang and ejabberd.
Yes you can.
You can use the Vm with Debian Image and follow this intructions.
http://www.howtoforge.com/virtual-mail-jabber-server-xmpp-with-iredmail-and-ejabberd-on-ubuntu-9.10
dont forget open the ports in the firewall.
Sorry I didn't have much time to put together a cleaner "how to". I just copied and pasted from my personal archive.
Here's what you'd have to do to compile the source code on a Compute Engine. Please let me know if you have any questions.
Image: debian-7-wheezy-v20140408
sudo apt-get update
sudo apt-get install build-essential
sudo apt-get install libncurses5-dev
sudo apt-get install openssl libssl-dev
sudo apt-get install libexpat1-dev
sudo apt-get install unixodbc-dev
wget http://pyyaml.org/download/libyaml/yaml-0.1.5.tar.gz
tar tar -xvzf yaml-0.1.5.tar.gz
cd yaml-0.1.5
./configure
sudo make
sudo make install
sudo apt-get install xsltproc
sudo apt-get install fop
cd ..
wget http://www.erlang.org/download/otp_src_R16B03-1.tar.gz
gunzip -c otp_src_R16B03-1.tar.gz | tar -xf -
cd o....
./configure --with-odbc=/usr/lib/odbc
sudo make
sudo make install
[.. Install git and clone repo here.. ]
git clone git#github.com:processone/ejabberd.git
cd ejabberd
./configure --enable-odbc --enable-mysql
sudo make
sudo make install

Resources