Ontotext-AD / graphdb-docker

Docker images for GraphDB
80 stars 47 forks source link

Error docker installation GraphDB free edition on M1 #27

Closed dicondina closed 2 years ago

dicondina commented 2 years ago

Hi,

I was installing GraphDB free using Docker for M1 but something went wrong. I'm sharing the error with you. Hope this can help.

make free VERSION=9.7.0
docker build --no-cache --pull --build-arg edition=free --build-arg version=9.7.0 -t ontotext/graphdb:9.7.0-free free-edition
[+] Building 1.1s (7/7) FINISHED                                                             
 => [internal] load build definition from Dockerfile                                    0.0s
 => => transferring dockerfile: 168B                                                    0.0s
 => [internal] load .dockerignore                                                       0.0s
 => => transferring context: 2B                                                         0.0s
 => [internal] load metadata for docker.io/adoptopenjdk/openjdk11:latest                0.6s
 => [internal] load build context                                                       0.0s
 => => transferring context: 1.14kB                                                     0.0s
 => CACHED [1/3] FROM docker.io/adoptopenjdk/openjdk11@sha256:c17ddb3fdbef744ff88721fb  0.0s
 => [2/3] ADD graphdb-free-9.7.0-dist.zip /tmp                                          0.2s
 => ERROR [3/3] RUN apk add --no-cache bash util-linux procps net-tools busybox-extras  0.2s
------
 > [3/3] RUN apk add --no-cache bash util-linux procps net-tools busybox-extras wget less curl &&     mkdir -p /opt/graphdb &&     cd /opt/graphdb &&     unzip /tmp/graphdb-free-9.7.0-dist.zip &&     rm /tmp/graphdb-free-9.7.0-dist.zip &&     mv graphdb-free-9.7.0 dist &&     mkdir -p /opt/graphdb/home:
#7 0.167 /bin/sh: 1: apk: not found
nikolaykolev commented 2 years ago

Hi, You've changed the base image from alpine based jdk to something else (debian or something), so the apk command has to be changed to "apt install" if the base image is debian based or "yum install" if it's centos. Please check what base image you're using and edit the Dockerfile accordingly.

dicondina commented 2 years ago

docker.io/adoptopenjdk/openjdk11:latest

Hi @nikolaykolev,

I changed the image docker.io/adoptopenjdk/openjdk11:alpine with the docker.io/adoptopenjdk/openjdk11 because the first image raised an error.

make free VERSION=9.11.1                          
docker build --no-cache --pull --build-arg edition=free --build-arg version=9.11.1 -t ontotext/graphdb:9.11.1-free free-edition
[+] Building 1.6s (4/4) FINISHED                                                                                                            
 => [internal] load build definition from Dockerfile                                                                                   0.0s
 => => transferring dockerfile: 904B                                                                                                   0.0s
 => [internal] load .dockerignore                                                                                                      0.0s
 => => transferring context: 2B                                                                                                        0.0s
 => ERROR [internal] load metadata for docker.io/adoptopenjdk/openjdk11:alpine                                                         1.5s
 => [auth] adoptopenjdk/openjdk11:pull token for registry-1.docker.io                                                                  0.0s
------
 > [internal] load metadata for docker.io/adoptopenjdk/openjdk11:alpine:
------
failed to solve with frontend dockerfile.v0: failed to create LLB definition: no match for platform in manifest sha256:dd8782ebe43728bedf0ef6d4eba9a680ca27aa5efe2d2256b4340e8044263ce8: not found
make: *** [free] Error 1