Pyrrha-Platform / Pyrrha-MQTT-Client

This repository contains the Pyrrha (created by Prometeo) solution MQTT client that sends device readings from the mobile app.
Apache License 2.0
4 stars 2 forks source link

docker-compose build: error unable to select packages #35

Closed albertum1 closed 2 years ago

albertum1 commented 2 years ago

On a fresh ubuntu, encountered the following error on docker-compose build.

image

is it okay for me to comment out L16 & 17 of the dockerfile? https://github.com/Pyrrha-Platform/Pyrrha-MQTT-Client/blob/main/Dockerfile#L16

upkarlidder commented 2 years ago

Thank you for reporting @albertum1. I get the same error running act locally. Tagging @dacamposol for suggestions as he authored the changes to this file.

❯ act -j docker-build
[Test Docker build/docker-build] 🚀  Start image=ghcr.io/catthehacker/ubuntu:act-latest
[Test Docker build/docker-build]   🐳  docker pull image=ghcr.io/catthehacker/ubuntu:act-latest platform= username= forcePull=false
[Test Docker build/docker-build]   🐳  docker create image=ghcr.io/catthehacker/ubuntu:act-latest platform= entrypoint=["/usr/bin/tail" "-f" "/dev/null"] cmd=[]
[Test Docker build/docker-build]   🐳  docker run image=ghcr.io/catthehacker/ubuntu:act-latest platform= entrypoint=["/usr/bin/tail" "-f" "/dev/null"] cmd=[]
[Test Docker build/docker-build]   🐳  docker exec cmd=[mkdir -m 0777 -p /var/run/act] user=root workdir=
[Test Docker build/docker-build]   🐳  docker cp src=/home/upkarlidder/Documents/upkar-code/cfc/pyrrha/Pyrrha-MQTT-Client/. dst=/home/upkarlidder/Documents/upkar-code/cfc/pyrrha/Pyrrha-MQTT-Client
[Test Docker build/docker-build]   🐳  docker exec cmd=[mkdir -p /home/upkarlidder/Documents/upkar-code/cfc/pyrrha/Pyrrha-MQTT-Client] user= workdir=
[Test Docker build/docker-build] ⭐  Run actions/checkout@v2
[Test Docker build/docker-build]   ✅  Success - actions/checkout@v2
[Test Docker build/docker-build] ⭐  Run Docker Lint
[Test Docker build/docker-build]   🐳  docker exec cmd=[bash --noprofile --norc -e -o pipefail /home/upkarlidder/Documents/upkar-code/cfc/pyrrha/Pyrrha-MQTT-Client/workflow/1] user= workdir=
[Test Docker build/docker-build]   ✅  Success - Docker Lint
[Test Docker build/docker-build] ⭐  Run Docker Build
[Test Docker build/docker-build]   🐳  docker exec cmd=[bash --noprofile --norc -e -o pipefail /home/upkarlidder/Documents/upkar-code/cfc/pyrrha/Pyrrha-MQTT-Client/workflow/2] user= workdir=
| Sending build context to Docker daemon    319kB
| Step 1/15 : FROM node:14 as build
|  ---> acd951b9df10
| Step 2/15 : WORKDIR /usr/src/app
|  ---> Using cache
|  ---> 391da50acd17
| Step 3/15 : COPY package*.json ./
|  ---> Using cache
|  ---> 45b374b0f5b7
| Step 4/15 : RUN npm ci --only=production
|  ---> Using cache
|  ---> 871c36301374
| Step 5/15 : FROM node:14-alpine@sha256:b2da3316acdc2bec442190a1fe10dc094e7ba4121d029cb32075ff59bb27390a
|  ---> 51d926a5599d
| Step 6/15 : RUN echo "http://dl-cdn.alpinelinux.org/alpine/edge/main" >> /etc/apk/repositories &&     apk update &&     apk add --no-cache     apk-tools=2.12.7-r3
|  ---> Using cache
|  ---> 491649bafbdd
| Step 7/15 : RUN apk add --no-cache     dumb-init=1.2.2-r1     libcrypto1.1=1.1.1l-r4     busybox=1.31.1-r10
|  ---> Running in 0e1670255ca8
| fetch http://dl-cdn.alpinelinux.org/alpine/v3.11/main/x86_64/APKINDEX.tar.gz
| fetch http://dl-cdn.alpinelinux.org/alpine/v3.11/community/x86_64/APKINDEX.tar.gz
| fetch http://dl-cdn.alpinelinux.org/alpine/edge/main/x86_64/APKINDEX.tar.gz
| ERROR: unable to select packages:
|   busybox-1.31.1-r9:
|     breaks: world[busybox=1.31.1-r10]
|     satisfies: alpine-baselayout-3.2.0-r3[/bin/sh]
|   libcrypto1.1-1.1.1i-r0:
|     breaks: world[libcrypto1.1=1.1.1l-r4]
|     satisfies: apk-tools-2.12.7-r3[so:libcrypto.so.1.1]
|                libssl1.1-1.1.1i-r0[so:libcrypto.so.1.1]
|                libtls-standalone-2.9.1-r0[so:libcrypto.so.1.1]
| The command '/bin/sh -c apk add --no-cache     dumb-init=1.2.2-r1     libcrypto1.1=1.1.1l-r4     busybox=1.31.1-r10' returned a non-zero code: 7
[Test Docker build/docker-build]   ❌  Failure - Docker Build
Error: exit with `FAILURE`: 7
dacamposol commented 2 years ago

It seems it's a problem due to the "hard" pinning on the Alpine repositories (1)

A new version appeared and the previous ones got impossible to access.

Already working on it 👍

upkarlidder commented 2 years ago

@albertum1 #36 fixed the issue and was merged. Can you please test again? Thank you!