EBISPOT / OLS

Ontology Lookup Service from SPOT at EBI
http://www.ebi.ac.uk/ols
Apache License 2.0
97 stars 41 forks source link

ols-config-importer Dockerfile refers to nonexisting "build-fix" #579

Closed KonradHoeffner closed 2 years ago

KonradHoeffner commented 2 years ago

On the current dev branch (568cab79e26f22ab705572a34101981b5be30dd5), the Dockerfile of ols-apps/ols-config-importer refers to a nonexistant build-fix, which causes it to fail:

ols-config-importer$ ls
Dockerfile  pom.xml  src
ols-config-importer$ cat Dockerfile                       

  FROM maven:3.6-jdk-8 AS build
  RUN mkdir /opt/ols
  COPY . /opt/ols/ 
  COPY build-fix/. /root/.m2/repository/
  RUN cd /opt/ols && ls && mvn clean package -DskipTests

  FROM openjdk:8-jre-alpine
  RUN apk add bash
  COPY --from=build /opt/ols/ols-apps/ols-config-importer/target/ols-config-importer.jar /opt/ols-config-importer.jar
  EXPOSE 8080
  ENTRYPOINT ["java", "-jar", "/opt/ols-config-importer.jar", "--ols.ontology.config=file:///config/ols-config.yaml","--ols.obofoundry.ontology.config=file://
  /config/obo-config.yaml"]
ols-config-importer$ docker-compose 
ols-config-importer$ docker build . -t ols-config-importer
[+] Building 1.1s (11/13)                                                                                                                                     
 => [internal] load build definition from Dockerfile                                                                                                     0.0s
 => => transferring dockerfile: 38B                                                                                                                      0.0s
 => [internal] load .dockerignore                                                                                                                        0.0s
 => => transferring context: 2B                                                                                                                          0.0s
 => [internal] load metadata for docker.io/library/openjdk:8-jre-alpine                                                                                  1.0s
 => [internal] load metadata for docker.io/library/maven:3.6-jdk-8                                                                                       1.0s
 => [build 1/5] FROM docker.io/library/maven:3.6-jdk-8@sha256:ac624d39dd0b7bed827d4b0d1bbaeb457012e0cba0fb6c53ce34b00bed16ec08                           0.0s
 => [internal] load build context                                                                                                                        0.0s
 => => transferring context: 1.03kB                                                                                                                      0.0s
 => [stage-1 1/3] FROM docker.io/library/openjdk:8-jre-alpine@sha256:f362b165b870ef129cbe730f29065ff37399c0aa8bcab3e44b51c302938c9193                    0.0s
 => CACHED [stage-1 2/3] RUN apk add bash                                                                                                                0.0s
 => CACHED [build 2/5] RUN mkdir /opt/ols                                                                                                                0.0s
 => CACHED [build 3/5] COPY . /opt/ols/                                                                                                                  0.0s
 => ERROR [build 4/5] COPY build-fix/. /root/.m2/repository/                                                                                             0.0s
------
 > [build 4/5] COPY build-fix/. /root/.m2/repository/:
------
failed to compute cache key: "/build-fix" not found: not found

I do not know if the file is missing and should be added back or if the reference to that file should be removed instead.

jamesamcl commented 2 years ago

You need to build the Dockerfile from the root of the repo. The build-fix folder is there.

KonradHoeffner commented 2 years ago

That works, thanks!