Install libssl-dev for Docker

20,688

Some packages are built against libressl in Alpine 3.6. Try replacing line 6 in your Dockerfile with the following

RUN apk add libressl-dev
Share:
20,688
Billy Darwin
Author by

Billy Darwin

Updated on July 30, 2022

Comments

  • Billy Darwin
    Billy Darwin 5 months

    I'm building an image for Docker and it's giving me error:

    ERROR: unsatisfiable constraints:
    libssl-dev (missing):
    required by: world[libssl-dev]
    

    running RUN apk add libssl-dev doesn't seem to help. What can I do to resolve this ?

    Dockerfile-dev:

    FROM python:3.6.7-alpine
    WORKDIR /usr/src/app
    COPY ./requirements.txt /usr/src/app/requirements.txt
    RUN apk add libssl-dev
    RUN apk add libffi-dev
    RUN apk add --update python3 python3-dev py-pip build-base
    RUN pip3 install -r requirements.txt
    COPY . /usr/src/app
    CMD python3 manage.py run -h 0.0.0.0
    
  • questionto42standswithUkraine
    questionto42standswithUkraine over 1 year
    libressl-dev does not seem to work for all settings. With an outdated postgreSQL alpine image I get ERROR: Service 'xyz' failed to build: The command '/bin/sh -c apk add libressl-dev' returned a non-zero code: 2.