clj-python / libpython-clj

Python bindings for Clojure
Eclipse Public License 2.0
1.05k stars 68 forks source link

Fix ubuntu version in dockerfiles #241

Open whamtet opened 1 year ago

whamtet commented 1 year ago

Thanks for the great work @cnuernber , I'm getting some issues when I try to build the images in in dockerfiles and it looks like its because you're starting FROM ubuntu:latest. Can you remember what version you were able to build it from and set the number accordingly? On my Intel Mac with Docker Desktop it hangs on step 3 asking for geographic information.

cnuernber commented 1 year ago

@behrica - What version of docker are you using when you build images?

whamtet commented 1 year ago

@cnuernber I think its the ubuntu version, not docker version. ubuntu:latest is not a fixed version so it has changed since the scripts were run successfully.

cnuernber commented 1 year ago

Right - sorry - my opinion is to upgrade to latest stable Ubuntu

behrica commented 1 year ago

Regarding the problem of "interactive" asking for something:

I have seen this from time to time, and there are usually specific command line options to prevent them. But it is indeed a good idea to freeze teh ubuntu versions in https://github.com/clj-python/libpython-clj/blob/f146cbd9389dc2c9931316123b969c0d83b5deb7/dockerfiles/Py39Dockerfile#L2

This make its more future proof.

I use various ubuntu versions, so I am not sure what is guaranteed to not have this problem.

The best thing would be to find a continously maintained Docker image which has python + Clojure preinstalled, and just refer to it.

behrica commented 1 year ago

The closetsI found was python + java: https://github.com/jupyter/docker-stacks/blob/main/pyspark-notebook/Dockerfile

But is has a lot of other staff as well, so gets big.

behrica commented 1 year ago

an other pproach is to use "devcontainers". This separates "base image" and "features added to it". I made a working one here: https://github.com/behrica/clojure-datascience-devcontainer