hey-johnnypark / docker-kafka-zookeeper

Docker image for Kafka (0.10.x - 0.11.x - 1.x, 2.x) message broker including Zookeeper
https://hub.docker.com/r/johnnypark/kafka-zookeeper/
53 stars 47 forks source link

ERROR: unsatisfiable constraints: gcompat (missing) #16

Open hitswa opened 1 year ago

hitswa commented 1 year ago

When I execute docker build . I get following error

[+] Building 6.8s (6/15)                                                                        docker:desktop-linux
 => [internal] load build definition from Dockerfile                                                            0.0s
 => => transferring dockerfile: 1.39kB                                                                          0.0s
 => [internal] load .dockerignore                                                                               0.0s
 => => transferring context: 2B                                                                                 0.0s
 => [internal] load metadata for docker.io/library/alpine:3.9.2                                                 4.3s
 => [ 1/11] FROM docker.io/library/alpine:3.9.2@sha256:644fcb1a676b5165371437feaa922943aaf7afcfa8bfee4472f6860  1.7s
 => => resolve docker.io/library/alpine:3.9.2@sha256:644fcb1a676b5165371437feaa922943aaf7afcfa8bfee4472f6860aa  0.0s
 => => sha256:f663714dca1af21af37546a875f0146db50643d8ac894c09f4f01639cefcca6b 1.51kB / 1.51kB                  0.0s
 => => sha256:3b00a3925ee4b356facd24aea8ece58982a66577023cb3596ce3a321aef976f9 2.69MB / 2.69MB                  1.5s
 => => sha256:644fcb1a676b5165371437feaa922943aaf7afcfa8bfee4472f6860aad1ef2a0 2.36kB / 2.36kB                  0.0s
 => => sha256:65faa9b36980bbcca914e5e6d3baa005261be9b0f305546553d670a6de939bcb 528B / 528B                      0.0s
 => => extracting sha256:3b00a3925ee4b356facd24aea8ece58982a66577023cb3596ce3a321aef976f9                       0.1s
 => [internal] load build context                                                                               0.0s
 => => transferring context: 5.36kB                                                                             0.0s
 => ERROR [ 2/11] RUN apk add --update openjdk8-jre supervisor bash gcompat                                     0.7s
------ 
 > [ 2/11] RUN apk add --update openjdk8-jre supervisor bash gcompat:                                                                                   
0.142 fetch http://dl-cdn.alpinelinux.org/alpine/v3.9/main/aarch64/APKINDEX.tar.gz
0.513 fetch http://dl-cdn.alpinelinux.org/alpine/v3.9/community/aarch64/APKINDEX.tar.gz
0.781 ERROR: unsatisfiable constraints:
0.786   gcompat (missing):
0.786     required by: world[gcompat]
------
Dockerfile:6
--------------------
   4 |     USER root
   5 |     
   6 | >>> RUN apk add --update openjdk8-jre supervisor bash gcompat
   7 |     
   8 |     ENV ZOOKEEPER_VERSION 3.4.13
--------------------
ERROR: failed to solve: process "/bin/sh -c apk add --update openjdk8-jre supervisor bash gcompat" did not complete successfully: exit code: 1

SOLUTION: The error is because the package gcompat is not available in the Alpine Linux package repository you are using (Alpine 3.9.2).

gcompat was available in older Alpine versions but may not be available in Alpine 3.9.2, which is a relatively older version. You can either update your Docker image to use a newer version of Alpine Linux or modify your Dockerfile to use a different base image that includes gcompat or doesn't require it.

So just replace FROM alpine:3.9.2 with FROM alpine:3.14 and done.

obalunenko commented 6 months ago

@hitswa This repository is not maintained. You can use this one: https://github.com/obalunenko/docker-kafka-zookeeper . It already has pre-build images for all Kafka with zookeeper versions published on the official site https://kafka.apache.org/downloads