Alexandru Circus
Alexandru Circus

Reputation: 5538

Cannot update openssl to 1.0.2 on ubuntu docker image

I've done this:

RUN apt-get -y remove openssl

RUN DEBIAN_FRONTEND=noninteractive apt-get -q update && apt-get -qy install wget make\
    && wget https://www.openssl.org/source/openssl-1.0.2g.tar.gz \
    && tar -xzvf openssl-1.0.2g.tar.gz \
    && cd openssl-1.0.2g \
    && ./config \
    && make install \
    && ln -sf /usr/local/ssl/bin/openssl 'which openssl'

First I removed old openssl (1.0.1 in my case) and updated with openssl 1.0.2 but after I build the image and connect to it via bash I still get 1.0.1 version when executing opnessl version command

Upvotes: 0

Views: 6415

Answers (1)

naimdjon
naimdjon

Reputation: 3602

You neither provided your Dockerfile nor how you start your container. Here is an example that works:

FROM ubuntu
RUN apt-get update
RUN apt-get -y remove openssl
RUN apt-get -y install gcc
RUN DEBIAN_FRONTEND=noninteractive apt-get -q update && apt-get -qy install wget make \
    && wget https://www.openssl.org/source/openssl-1.0.2g.tar.gz \
    && tar -xzvf openssl-1.0.2g.tar.gz \
    && cd openssl-1.0.2g \
    && ./config \
    && make install \
    && ln -sf /usr/local/ssl/bin/openssl 'which openssl'

Building:

docker build . -t openssl_test

Testing the version:

$ docker run -it openssl_test openssl version
OpenSSL 1.0.2g  1 Mar 2016

Upvotes: 5

Related Questions