Docker compose install error 'curl: (56) OpenSSL SSL_read: SSL_ERROR_SYSCALL, errno 104' in Ubuntu - docker-compose

I am trying to install docker compose on the Ubuntu 18.04.2 LTS.
I tried installing using the official link here and followed the Docker Compose documentation given, but when i run the command
sudo curl -L "https://github.com/docker/compose/releases/download/1.24.1/docker-compose-$(uname -s)-$(uname -m)" -o /usr/local/bin/docker-compose
then after some time it gives me this error
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 617 0 617 0 0 613 0 --:--:-- 0:00:01 --:--:-- 613
24 8280k 24 2056k 0 0 789 0 2:59:06 0:44:27 2:14:39 0
**curl: (56) OpenSSL SSL_read: SSL_ERROR_SYSCALL, errno 104**
Kindly help me on this i have tried many times but it is not working.

I had the same problem. I assume that you are using Docker Docs, which are usually outdated. You should go to Docker Compose Github instead.
Solution
1 - Open Linux Terminal by pressing Ctrl + Alt + T
2 - Install curl:
sudo apt install curl
3 - Turn on root privileges in terminal for your user (something like admin in Windows OS), with command:
sudo -i
4 - Go to Docker Compose Github. In releases you will find this code. Run it in your linux terminal.
curl -L https://github.com/docker/compose/releases/download/1.25.1-rc1/docker-compose-`uname -s`-`uname -m` -o /usr/local/bin/docker-compose
chmod +x /usr/local/bin/docker-compose
5 - Turn off root privileges in terminal for your user, with command:
exit
6 - Check if docker-compose is installed with command:
docker-compose version
Outcome: In your terminal, you should see docker-compose version number and some other informations.

Related

How do I install telepresence version 1 in ubuntu 22.04?

I am trying to install telepresence version 1 in ubuntu 22.04 but I don't have the download links to it.
Use this commands:
# 1. Download the latest binary (~50 MB):
sudo curl -fL https://app.getambassador.io/download/tel2/linux/amd64/latest/telepresence -o /usr/local/bin/telepresence
# 2. Make the binary executable:
sudo chmod a+x /usr/local/bin/telepresence

Perlbrew fails to install new perl version

I'm attempting to install a new perl version with perlbrew:
perlbrew install perl-5.34.1
but this produces the error:
Fetching perl 5.34.1 as /home/703404669/perl5/perlbrew/dists/perl-5.34.1.tar.gz
Download https://cpan.metacpan.org/authors/id/S/SH/SHAY/perl-5.34.1.tar.gz to /home/703404669/perl5/perlbrew/dists/perl-5.34.1.tar.gz
ERROR: Failed to download https://cpan.metacpan.org/authors/id/S/SH/SHAY/perl-5.34.1.tar.gz
ERROR: Failed to execute the command
curl --silent --location --fail -o /home/703404669/perl5/perlbrew/dists/perl-5.34.1.tar.gz https://cpan.metacpan.org/authors/id/S/SH/SHAY/perl-5.34.1.tar.gz
Reason:
5888
which I'm unable to find on Google searches.
I know that there isn't any typo, because when I intentionally write something wrong, I get a different error.
I have no idea why this is happening, nor to fix it.
EDIT:
the command
curl --location https://cpan.metacpan.org/authors/id/S/SH/SHAY/perl-5.34.1.tar.gz > /dev/null
outputs
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 17.3M 100 17.3M 0 0 68.5M 0 --:--:-- --:--:-- --:--:-- 68.5M
How can I install a perl version with perlbrew?
5888 is 0x1700. This could be $? for a program that used exit(0x17), which is to say exit(23). curl uses that exit code when
23 Write error. Curl couldn't write data to a local filesystem or similar.
Sounds like it can't write to /home/703404669/perl5/perlbrew/dists/perl-5.34.1.tar.gz.
If the directory doesn't exist, maybe you didn't properly install perlbrew.
Ways to install perlbrew:
\curl -L https://install.perlbrew.pl | bash
\wget -O - https://install.perlbrew.pl | bash
\fetch -o- https://install.perlbrew.pl | sh
sudo cpan App::perlbrew
perlbrew init
You also need to place a command in your shell's interactive startup script as instructed.
Or maybe you don't have enough disk space. Did you mean to install perlbrew somewhere other than /home/703404669/perl5/perlbrew?
The default perlbrew root directory is ~/perl5/perlbrew, which can be changed by setting PERLBREW_ROOT environment variable before the installation and initialization.
In my case the problem was that it would not create the destination folder for that download. So what fixed it for me was:
mkdir $HOME/perl5/perlbrew/dists -p
In the above case just:
mkdir -p /home/703404669/perl5/perlbrew/dists

minikube install failes on OS X

I'm downloading minikube on OS X (Catalina 10.15.7) from releases/latest/minikube-darwin-amd64 and it fails when run, see below:
minikube version
/usr/local/bin/minikube: line 1: syntax error near unexpected token `<'
/usr/local/bin/minikube: line 1: `<?xml version='1.0' encoding='UTF-8'?><Error><Code>NoSuchKey</Code><Message>The specified key does not exist.</Message><Details>No such object: minikube/releases/latest/minikube-darwin-amd</Details></Error>'
Not sure what key it refers to.
This problem was caused by an invalid URL in the curl command. Looking at the error message, my guess is that the 64 was missing at the end.
I've reproduced this error and we can see that the error message is exactly the same as in the question (I'm using Linux so instead of minikube-darwin-amd64 I used minikube-linux-amd64):
NOTE: I didn't provide 64 at the end.
$ curl -LO https://storage.googleapis.com/minikube/releases/latest/minikube-linux-amd
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 205 100 205 0 0 6029 0 --:--:-- --:--:-- --:--:-- 6029
$ sudo install minikube-linux-amd /usr/local/bin/minikube
The size is too small for the minikube:
$ ls -lh /usr/local/bin/minikube
-rwxr-xr-x 1 root root 205 Aug 13 07:30 /usr/local/bin/minikube
The error message:
$ minikube version
/usr/local/bin/minikube: line 1: syntax error near unexpected token `<'
/usr/local/bin/minikube: line 1: `<?xml version='1.0' encoding='UTF-8'?><Error><Code>NoSuchKey</Code><Message>The specified key does not exist.</Message><Details>No such object: minikube/releases/latest/minikube-linux-amd</Details></Error>'
Now let's install the minikube correctly:
$ curl -LO https://storage.googleapis.com/minikube/releases/latest/minikube-linux-amd64
$ sudo install minikube-linux-amd64 /usr/local/bin/minikube
We can see that the real size of the minikube is >65M:
$ ls -lh /usr/local/bin/minikube
-rwxr-xr-x 1 root root 67M Aug 13 07:32 /usr/local/bin/minikube
And everything works as expected:
$ minikube version
minikube version: v1.22.0
commit: a03fbcf166e6f74ef224d4a63be4277d017bb62e

How to create a dind docker image with azure-cli on Alpine linux?

I am trying to install the azure-cli in the dind:latest image based on alpine.
For context, I want to use it to connect to AKS and deploy an app to Kubernetes via Gitlab.
In my gitlab-ci.yml file I start with this
image: docker:latest
services:
- docker:dind
and then I try to install the azure-cli
deploy-to-k8s--dev: # k8s namespace "dev"
stage: deploy-to-k8s
# image: microsoft/azure-cli
script:
# I need the azure cli in the dind:latest container
# so install bash,curl and finally the cli
- apk update
- apk upgrade
- apk add bash
- apk add --no-cache curl
- curl -L https://aka.ms/InstallAzureCli | bash
- az
and I get the following error
$ curl -L https://aka.ms/InstallAzureCli | bash
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0
100 167 100 167 0 0 167 0 0:00:01 --:--:-- 0:00:01 644
100 1367 100 1367 0 0 1367 0 0:00:01 --:--:-- 0:00:01 1367
mktemp: Invalid argument
ERROR: Job failed: error executing remote command: command terminated with non-zero exit code: Error executing in Docker Container: 1
It is the first time that I try to work with Alpine Linux and I have no idea how it is built and what tools it uses...
Has anyone any suggestion?
EDIT
based on the accepted answer this is the final code that works
deploy-to-k8s--dev: # k8s namespace "dev"
stage: deploy-to-k8s
script:
# I need the azure cli in the dind:latest container
# so install bash,curl and finally the cli
- apk update
- apk upgrade
- apk add bash make py-pip
- apk add --virtual=build gcc libffi-dev musl-dev openssl-dev python2-dev
- pip install azure-cli
- apk del --purge build
- az -h
This helped me in one of my alpine based image
apk update
apk add bash py-pip
apk add --virtual=build gcc libffi-dev musl-dev openssl-dev python- dev
pip install azure-cli
apk del --purge build

Running Laravel Dusk on Homestead

I use Homestead Version 1.0.1 and Laravel version 5.4.16. I setup the Laravel dusk by reading the documentation.
But, when I run php artisan dusk by ssh to my homestead. I got an error like the following
PHPUnit 5.7.17 by Sebastian Bergmann and contributors.
E 1
/ 1 (100%)
Time: 2.52 minutes, Memory: 10.00MB
There was 1 error:
1) Tests\Browser\ExampleTest::testBasicExample
Facebook\WebDriver\Exception\WebDriverCurlException: Curl error thrown
for http POST to /session with params:
{"desiredCapabilities":{"browserName":"chrome","platform":"ANY","chromeOptions":{"binary":"","args":["no-first-run"]}}}
Operation timed out after 30001 milliseconds with 0 bytes received
Is there anyway to fix this 😊?
Yes, it can be found on the github pages of Dusk. It is a known issue and they are working to update the next homestead box.
The basic issue is that the homestead box has no visual interface and
that dusk runs a real browser, so you have to install a chromedriver
if you want to use it.
But for now this worked for me:
https://github.com/laravel/dusk/issues/50#issuecomment-275155974
Not included in that post but necessary for me:
make sure you have following permission set cd vendor/laravel/dusk/bin; chmod 775 *
Steps from the github post:
First of all, google-chrome is requried to be installed in guest OS:
$ wget -q -O - https://dl-ssl.google.com/linux/linux_signing_key.pub | sudo apt-key add -
$ sudo sh -c 'echo "deb [arch=amd64] http://dl.google.com/linux/chrome/deb/ stable main" >> /etc/apt/sources.list.d/google-chrome.list'
$ sudo apt-get update && sudo apt-get install -y google-chrome-stable
Next thing is xvfb:
$ sudo apt-get install -y xvfb
Try to start ./vendor/laravel/dusk/bin/chromedriver-linux --port=8888. If you have some errors about loading libraries (libnss3.so, libgconf-2.so.4), try this:
$ sudo apt-get install -y libnss3-dev libxi6 libgconf-2-4
When you see
$ ./vendor/laravel/dusk/bin/chromedriver-linux --port=8888
Starting ChromeDriver 2.25.426924 (649f9b868f6783ec9de71c123212b908bf3b232e) on port 8888
Only local connections are allowed.
this means ChromeDriver can be started (so SupportsChrome trait should be able to start it too). You can stop this process for now (Ctrl+C).
Run
$ Xvfb :0 -screen 0 1280x960x24 &
in a separate terminal window.
Also you may want to add your dev domain in guest's /etc/hosts file:
127.0.0.1 domain.dev.
This issue is to add the chromedriver to homestead by default and will
be solved mid April. https://github.com/laravel/homestead/issues/516