libpython-clj icon indicating copy to clipboard operation
libpython-clj copied to clipboard

Fix ubuntu version in dockerfiles

Open whamtet opened this issue 2 years ago • 6 comments

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.

whamtet avatar Mar 30 '23 21:03 whamtet

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

cnuernber avatar Mar 31 '23 13:03 cnuernber

@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.

whamtet avatar Mar 31 '23 13:03 whamtet

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

cnuernber avatar Mar 31 '23 14:03 cnuernber

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 avatar Apr 01 '23 17:04 behrica

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 avatar Apr 01 '23 17:04 behrica

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

behrica avatar Apr 01 '23 17:04 behrica