How to use Quicklisp inside the image?
Hi,
I followed your usage instructions (https://hub.docker.com/r/clfoundation/sbcl).
But my lisp file that runs the application (./your-daemon-or-script.lisp) expects quicklisp (ql
) to be available.
On my machine, my .sbclrc loads it if it finds it:
;;; The following lines added by ql:add-to-init-file:
#-quicklisp
(let ((quicklisp-init (merge-pathnames "quicklisp/setup.lisp"
(user-homedir-pathname))))
(when (probe-file quicklisp-init)
(load quicklisp-init)))
However
-
there is no home directory in the docker image
-
I found the
/usr/local/bin/install-quicklisp
shell script to install Quicklisp- so, why not install it by default? or offer an image with Quicklisp available? I think it was the case of daewok/lisp-devel, and it was handy :)
-
the script uses
/usr/local/share/common-lisp/source/quicklisp/quicklisp.lisp
and I see nosetup.lisp
- edit: after digging, I found that quicklisp's setup script is in /root/quicklisp/setup.lisp (could be useful to know) (created after we install Quicklisp)
-
the script uses an environment variable ($QUICKLISP_ADD_TO_INIT_FILE) that must be set to "true" to "add-to-init-file". So the command that does it is:
QUICKLISP_ADD_TO_INIT_FILE=true /usr/local/bin/install-quicklisp
- to bad it isn't the default :]
- it is not documented :( How to best use it in a .gitlab-ci.yml too?
SO, it seems that the one Dockerfile command required to enable Quicklisp is:
RUN QUICKLISP_ADD_TO_INIT_FILE=true /usr/local/bin/install-quicklisp
What's the best practice to use Quicklisp with this Docker image anyways?
Would it be possible to declare Quicklisp dependencies inside the Dockerfile, to speed up the start up process (hopefully)?
TLDR; more doc about this is welcome :]
Thanks!