'RUN apk --update add python3 py3-pip python3-dev not wokring in alpine docker image

Here I'm trying to build a terraform image using Alpine with the following Dockerfile, but success. However same used to work until a few months ago, not sure went changed

Dockerfile:

    FROM alpine:latest
    
    ARG Test_GID=1002
    ARG Test_UID=1002
    
    # Change to root user
    USER root
    
    RUN addgroup --gid ${Test_GID:-1002} test
    RUN adduser -S -u ${Test_UID:-1002} -D -h "$(pwd)" -G test test
    
    ENV USER=test
    
    ENV TERRAFORM_VERSION=0.15.4
    ENV TERRAFORM_SHA256SUM=ddf9fdfdfdsffdsffdd4e7c080da9a106befc1ff9e53b57364622720114e325c
    ENV TERRAFORM_DOWNLOAD_URL=https://releases.hashicorp.com/terraform/${TERRAFORM_VERSION}/terraform_${TERRAFORM_VERSION}_linux_amd64.zip
    RUN apk --update add python3 py3-pip python3-dev
    RUN apk update && \
            apk add ansible \
            gcc \
            libffi \
            libffi-dev \
            musl-dev \
            make \
            openssl \
            openssl-dev \
            curl \
            zip \
            git \
            jq

When I run the command docker image build -t terraform:0.15.5 . I get below-shown error

enter image description here



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source