Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

wget installation does not work on Alpine #73

Closed
goloroden opened this issue May 1, 2016 · 8 comments

Comments

Projects
None yet
8 participants
@goloroden
Copy link

commented May 1, 2016

Steps to reproduce

$ docker run -it mhart/alpine-node:6 sh
# wget -O /usr/local/bin/dumb-init https://github.com/Yelp/dumb-init/releases/download/v1.0.1/dumb-init_1.0.1_amd64

Expected result

dumb-init is installed, as it happens when using the ubuntu container, e.g..

Actual result

An error message is returned by wget:

Connecting to github.com (192.30.252.120:443)
wget: can't execute 'ssl_helper': No such file or directory
wget: error getting response: Connection reset by peer

Any thoughts on this?

@goloroden

This comment has been minimized.

Copy link
Author

commented May 1, 2016

Okay, forget it … it was a problem with the CA certificates on Alpine Linux. You need to run

# apk update
# apk add ca-certificates
# update-ca-certificates

before running wget, then it works :-)

@mikecroft

This comment has been minimized.

Copy link

commented Aug 17, 2016

FYI for others coming across this, adding the above commands to my Dockerfile did not work, I needed to specifically add the ca-certificates to wget like this:

 RUN   apk update \                                                                                                                                                                                                                        
  &&   apk add ca-certificates wget \                                                                                                                                                                                                      
  &&   update-ca-certificates    

that worked perfectly and my image built with no problems.

@tvalasek

This comment has been minimized.

Copy link

commented Aug 18, 2016

openssl package may be required too:

apk update && apk add ca-certificates && update-ca-certificates && apk add openssl

@asottile

This comment has been minimized.

Copy link
Contributor

commented Aug 18, 2016

How difficult would it be to make an apk package for dumb-init? We're experienced in debian packaging but unfamiliar with alpine's ecosystem and would love help if it's possible

@igorsantos07

This comment has been minimized.

Copy link

commented Aug 21, 2016

For those who arrive here, another solution is simply to use curl instead, if your idea is to run install scripts. It sounds even simpler, with less options to deal with - the default is to send to stdin for instance.

Example: to install composer on php:7-fpm-alpine I did the following:
RUN curl https://raw.githubusercontent.com/composer/getcomposer.org/master/web/installer | php -- --quiet

instead of what's suggested by Composer (that stumbles upon the CA issues on this post):
RUN wget https://raw.githubusercontent.com/composer/getcomposer.org/master/web/installer -O - -q | php -- --quiet

@vinyll

This comment has been minimized.

Copy link

commented Sep 21, 2016

I had

wget: can't execute 'ssl_helper': No such file or directory
wget: error getting response: Connection reset by peer

apk add openssl solved in my case

@samrocketman

This comment has been minimized.

Copy link

commented Sep 24, 2016

I frown upon curl | bash installation instructions (curl | php is no different). I hope dumb-init never adopts such insecure recommendations as instructions. It grooms users with poor behaviors.

@dhoer

This comment has been minimized.

Copy link

commented Oct 7, 2016

As of Alpine Linux 3.3 there exists a new --no-cache option for apk. It allows users to install packages with an index that is updated and used on-the-fly and not cached locally:

RUN apk --no-cache add openssl


Update on this;

While that fixed it for https protocol, it caused issues for http protocol. Reinstalling wget on alpine fixed wget: error getting response: Invalid argument error:

RUN apk --no-cache add openssl wget

alexbepple added a commit to it-agile/financial-radar that referenced this issue Feb 5, 2017

& add the simplest smoke test
explanation for the line
	RUN apk --no-cache add openssl
Yelp/dumb-init#73

bbarker added a commit to bbarker/nix that referenced this issue Sep 1, 2017

Fixes for recent alpine images
See Yelp/dumb-init#73 for more discussion and alternatives

cheezenaan added a commit to cheezenaan-sandbox/sample_app_rev4 that referenced this issue May 30, 2018

Introduce openssl into Dockerfiles
* to avoid failure executing wget
* ref. Yelp/dumb-init#73

matentzn added a commit to INCATools/ontology-development-kit that referenced this issue May 15, 2019

Dockerfile fix ssl problem when running docker in virtual environment
Previously, it occassionally happened (EBI cluster, PHIPO vagrant server) that wget failed with a (connection reset by peer) error, see Yelp/dumb-init#73.

The problem is solved by re-installing openssl and wget.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.