luontola / native-clojure-lambda

Example project of Clojure + GraalVM Native Image + AWS Lambda container images
Apache License 2.0
29 stars 3 forks source link

Cannot find oracle containers for GraalVM #1

Open raymcdermott opened 2 years ago

raymcdermott commented 2 years ago

First - thanks for the great work on this project. It's clearly taken quite some effort to put it all together and write it up so I am grateful for your efforts.

When I try to run the project (on Linux Mint, Cinnamon) I get a failure:

ray@ray-X570:~/development/oss/native-clojure-lambda$ docker-compose up -d --build graalvm
Creating network "native-clojure-lambda_default" with the default driver
Building graalvm
Step 1/6 : FROM oracle/graalvm-ce:20.3.0-java11
ERROR: Service 'graalvm' failed to build: pull access denied for oracle/graalvm-ce, repository does not exist or may require 'docker login': denied: requested access to the resource is denied
ray@ray-X570:~/development/oss/native-clojure-lambda$ docker login
Authenticating with existing credentials...
WARNING! Your password will be stored unencrypted in /home/ray/.docker/config.json.
Configure a credential helper to remove this warning. See
https://docs.docker.com/engine/reference/commandline/login/#credentials-store

Login Succeeded
ray@ray-X570:~/development/oss/native-clojure-lambda$ docker-compose up -d --build graalvm
Building graalvm
Step 1/6 : FROM oracle/graalvm-ce:20.3.0-java11
ERROR: Service 'graalvm' failed to build: pull access denied for oracle/graalvm-ce, repository does not exist or may require 'docker login': denied: requested access to the resource is denied

I then start looking for where I can find the graalvm CE containers and find this https://github.com/graalvm/container

And it seems they are now publishing to Github docker registry eg we must use ghcr.io/graalvm/jdk:java17-21.3.0

After some rejigging of the docker files I got it all pulling the GraalVM images and then I hit another error when running

ray@ray-X570:~/development/oss/native-clojure-lambda$  docker-compose up -d --build native

Creating native-clojure-lambda_native_1 ... error

ERROR: for native-clojure-lambda_native_1  Cannot start service native: driver failed programming external connectivity on endpoint native-clojure-lambda_native_1 (d8f41dc0c4e2104ead051985a16afe5509e787988d98426ab17d58b1ee751cdd): Bind for 127.0.0.1:9000 failed: port is already allocated

So I changed the ports in the docker-compose file and it all started to work.

I would be happy to make a PR with the changes but I wanted to check whether or not I'm holding something wrong first cos maybe it all still works for you and something is off with my environment.

Linux ray-X570 5.4.0-94-generic #106-Ubuntu SMP Thu Jan 6 23:58:14 UTC 2022 x86_64 x86_64 x86_64 GNU/Linux

openjdk version "17.0.1" 2021-10-19
OpenJDK Runtime Environment (build 17.0.1+12-Ubuntu-120.04)
OpenJDK 64-Bit Server VM (build 17.0.1+12-Ubuntu-120.04, mixed mode, sharing)

Docker version 20.10.12, build e91ed57

docker-compose version 1.25.0, build unknown

Let me know what you think.

jacksonneal commented 2 years ago

Just wanted to second that I can reproduce this issue and would appreciate the PR for a fix.

Also, @raymcdermott, are you able to successfully build and execute the smoke-test when running on jvm? I am running into issue #2.