Skip to content

Commit e37f0ea

Browse files
committed
Added 01-Docker Step 07
1 parent 3cfc1e2 commit e37f0ea

File tree

3 files changed

+23
-0
lines changed

3 files changed

+23
-0
lines changed

clisp/.clisprc.lisp

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
;;; The following lines added by ql:add-to-init-file:
2+
#-quicklisp
3+
(let ((quicklisp-init (merge-pathnames
4+
"quicklisp/setup.lisp"
5+
(user-homedir-pathname))))
6+
(when (probe-file quicklisp-init)
7+
(load quicklisp-init)))

clisp/Dockerfile

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
FROM ubuntu:latest
2+
3+
RUN apt-get update && \
4+
apt-get install -y wget clisp && \
5+
wget -O /quicklisp.lisp https://beta.quicklisp.org/quicklisp.lisp && \
6+
clisp -x "(load 'quicklisp) (quicklisp-quickstart:install)"
7+
COPY .clisprc.lisp /root/.clisprc.lisp
8+
9+
VOLUME /sources

clisp/code/factorial.lisp

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
(defun factorial (n)
2+
(if (= n 0)
3+
1
4+
(* n (factorial (- n 1)))))
5+
6+
7+
(print (factorial 5))

0 commit comments

Comments
 (0)