diff --git a/.dockerignore b/.dockerignore new file mode 100644 index 0000000..af84266 --- /dev/null +++ b/.dockerignore @@ -0,0 +1,2 @@ +.qlot/local-projects +.qlot/dists/quicklisp diff --git a/.gitignore b/.gitignore index cac1d1b..94f2b66 100644 --- a/.gitignore +++ b/.gitignore @@ -9,5 +9,3 @@ t/test.db .qlot/ -qlfile -qlfile.lock diff --git a/docker/Dockerfile b/docker/Dockerfile index 232e3f5..97c8ec5 100644 --- a/docker/Dockerfile +++ b/docker/Dockerfile @@ -1,8 +1,15 @@ ARG LISP=sbcl + +FROM fukamachi/qlot AS build-env + +WORKDIR /app +COPY qlfile /app +COPY qlfile.lock /app + +RUN qlot install --no-deps + FROM fukamachi/${LISP} AS base -RUN ros -e '(ql-dist:install-dist "http://dist.ultralisp.org/" :prompt nil)' -RUN ros install fukamachi/cl-dbi rove RUN apt-get update && \ apt-get install -y --no-install-recommends \ libsqlite3-dev \ @@ -10,9 +17,16 @@ RUN apt-get update && \ default-mysql-client && \ rm -rf /var/lib/apt/lists/* -COPY . /app WORKDIR /app +COPY --from=build-env /app/.qlot /app/.qlot +RUN set -x; \ + ros -e '(ql:update-dist "quicklisp" :prompt nil)' && \ + ros install "fukamachi/qlot" -ENV CL_SOURCE_REGISTRY "/app/" +COPY qlfile /app +COPY qlfile.lock /app + +COPY . /app +RUN qlot install ENTRYPOINT "/app/docker/entrypoint.sh" diff --git a/docker/entrypoint.sh b/docker/entrypoint.sh index da3ed47..76b2ba5 100755 --- a/docker/entrypoint.sh +++ b/docker/entrypoint.sh @@ -11,5 +11,5 @@ while ! mysql -u "$MYSQL_USER" \ sleep 1 done -ros -s mito-test -rove mito-test.asd +qlot exec ros -s mito-test +.qlot/bin/rove mito-test.asd diff --git a/qlfile b/qlfile new file mode 100644 index 0000000..85374d6 --- /dev/null +++ b/qlfile @@ -0,0 +1,5 @@ +ql cl-dbi :upstream +ql cl-mysql :upstream +ql dissect :upstream +ql sxql :upstream +ql rove :upstream diff --git a/qlfile.lock b/qlfile.lock new file mode 100644 index 0000000..52738a8 --- /dev/null +++ b/qlfile.lock @@ -0,0 +1,29 @@ +("quicklisp" . + (:class qlot/source/dist:source-dist + :initargs (:distribution "https://beta.quicklisp.org/dist/quicklisp.txt" :%version :latest) + :version "2023-10-21")) +("cl-dbi" . + (:class qlot/source/ql:source-ql-upstream + :initargs nil + :version "ql-upstream-2ff41f0706180e140a31b844da4f0272e1a281cd" + :remote-url "https://github.com/fukamachi/cl-dbi.git")) +("cl-mysql" . + (:class qlot/source/ql:source-ql-upstream + :initargs nil + :version "ql-upstream-b273cf772f13a525b534f5ee58bf36fb733204f3" + :remote-url "https://github.com/hackinghat/cl-mysql.git")) +("dissect" . + (:class qlot/source/ql:source-ql-upstream + :initargs nil + :version "ql-upstream-a70cabcd748cf7c041196efd711e2dcca2bbbb2c" + :remote-url "https://github.com/Shinmera/dissect.git")) +("sxql" . + (:class qlot/source/ql:source-ql-upstream + :initargs nil + :version "ql-upstream-c79c252bef276bb0343ced5149083e3b91d85d9b" + :remote-url "https://github.com/fukamachi/sxql.git")) +("rove" . + (:class qlot/source/ql:source-ql-upstream + :initargs nil + :version "ql-upstream-cacea7331c10fe9d8398d104b2dfd579bf7ea353" + :remote-url "https://github.com/fukamachi/rove.git"))