Commit 2c8c68df authored by Eric Timmons's avatar Eric Timmons

Add script to trivially install Quicklisp

parent f466bf82
Pipeline #2675 passed with stage
in 1 minute and 28 seconds
......@@ -119,6 +119,9 @@ RUN set -x \
&& rm quicklisp.lisp.asc \
&& rm -rf "$GNUPGHOME"
# Add the script to trivially install Quicklisp
COPY install-quicklisp /usr/local/bin/install-quicklisp
# Add the entrypoint
WORKDIR /
......
#!/bin/sh
if [ -z "$QUICKLISP_DIST_VERSION" ] || [ "$QUICKLISP_DIST_VERSION" = "latest" ]; then
QUICKLISP_DIST_VERSION=nil
else
QUICKLISP_DIST_VERSION="\"quicklisp/$QUICKLISP_DIST_VERSION\""
fi
if [ -z "$QUICKLISP_CLIENT_VERSION" ] || [ "$QUICKLISP_CLIENT_VERSION" = "latest" ]; then
QUICKLISP_CLIENT_VERSION=nil
else
QUICKLISP_CLIENT_VERSION="\"$QUICKLISP_CLIENT_VERSION\""
fi
abcl --batch \
--load /usr/local/share/common-lisp/source/quicklisp/quicklisp.lisp \
--eval "(quicklisp-quickstart:install :dist-version $QUICKLISP_DIST_VERSION :client-version $QUICKLISP_CLIENT_VERSION)" \
--eval "(when (equalp \"$QUICKLISP_ADD_TO_INIT_FILE\" \"true\") (ql-util:without-prompting (ql:add-to-init-file)))"
......@@ -119,6 +119,9 @@ RUN set -x \
&& rm quicklisp.lisp.asc \
&& rm -rf "$GNUPGHOME"
# Add the script to trivially install Quicklisp
COPY install-quicklisp /usr/local/bin/install-quicklisp
# Add the entrypoint
WORKDIR /
......
#!/bin/sh
if [ -z "$QUICKLISP_DIST_VERSION" ] || [ "$QUICKLISP_DIST_VERSION" = "latest" ]; then
QUICKLISP_DIST_VERSION=nil
else
QUICKLISP_DIST_VERSION="\"quicklisp/$QUICKLISP_DIST_VERSION\""
fi
if [ -z "$QUICKLISP_CLIENT_VERSION" ] || [ "$QUICKLISP_CLIENT_VERSION" = "latest" ]; then
QUICKLISP_CLIENT_VERSION=nil
else
QUICKLISP_CLIENT_VERSION="\"$QUICKLISP_CLIENT_VERSION\""
fi
abcl --batch \
--load /usr/local/share/common-lisp/source/quicklisp/quicklisp.lisp \
--eval "(quicklisp-quickstart:install :dist-version $QUICKLISP_DIST_VERSION :client-version $QUICKLISP_CLIENT_VERSION)" \
--eval "(when (equalp \"$QUICKLISP_ADD_TO_INIT_FILE\" \"true\") (ql-util:without-prompting (ql:add-to-init-file)))"
......@@ -119,6 +119,9 @@ RUN set -x \
&& rm quicklisp.lisp.asc \
&& rm -rf "$GNUPGHOME"
# Add the script to trivially install Quicklisp
COPY install-quicklisp /usr/local/bin/install-quicklisp
# Add the entrypoint
WORKDIR /
......
#!/bin/sh
if [ -z "$QUICKLISP_DIST_VERSION" ] || [ "$QUICKLISP_DIST_VERSION" = "latest" ]; then
QUICKLISP_DIST_VERSION=nil
else
QUICKLISP_DIST_VERSION="\"quicklisp/$QUICKLISP_DIST_VERSION\""
fi
if [ -z "$QUICKLISP_CLIENT_VERSION" ] || [ "$QUICKLISP_CLIENT_VERSION" = "latest" ]; then
QUICKLISP_CLIENT_VERSION=nil
else
QUICKLISP_CLIENT_VERSION="\"$QUICKLISP_CLIENT_VERSION\""
fi
abcl --batch \
--load /usr/local/share/common-lisp/source/quicklisp/quicklisp.lisp \
--eval "(quicklisp-quickstart:install :dist-version $QUICKLISP_DIST_VERSION :client-version $QUICKLISP_CLIENT_VERSION)" \
--eval "(when (equalp \"$QUICKLISP_ADD_TO_INIT_FILE\" \"true\") (ql-util:without-prompting (ql:add-to-init-file)))"
......@@ -119,6 +119,9 @@ RUN set -x \
&& rm quicklisp.lisp.asc \
&& rm -rf "$GNUPGHOME"
# Add the script to trivially install Quicklisp
COPY install-quicklisp /usr/local/bin/install-quicklisp
# Add the entrypoint
WORKDIR /
......
#!/bin/sh
if [ -z "$QUICKLISP_DIST_VERSION" ] || [ "$QUICKLISP_DIST_VERSION" = "latest" ]; then
QUICKLISP_DIST_VERSION=nil
else
QUICKLISP_DIST_VERSION="\"quicklisp/$QUICKLISP_DIST_VERSION\""
fi
if [ -z "$QUICKLISP_CLIENT_VERSION" ] || [ "$QUICKLISP_CLIENT_VERSION" = "latest" ]; then
QUICKLISP_CLIENT_VERSION=nil
else
QUICKLISP_CLIENT_VERSION="\"$QUICKLISP_CLIENT_VERSION\""
fi
abcl --batch \
--load /usr/local/share/common-lisp/source/quicklisp/quicklisp.lisp \
--eval "(quicklisp-quickstart:install :dist-version $QUICKLISP_DIST_VERSION :client-version $QUICKLISP_CLIENT_VERSION)" \
--eval "(when (equalp \"$QUICKLISP_ADD_TO_INIT_FILE\" \"true\") (ql-util:without-prompting (ql:add-to-init-file)))"
......@@ -119,6 +119,9 @@ RUN set -x \
&& rm quicklisp.lisp.asc \
&& rm -rf "$GNUPGHOME"
# Add the script to trivially install Quicklisp
COPY install-quicklisp /usr/local/bin/install-quicklisp
# Add the entrypoint
WORKDIR /
......
#!/bin/sh
if [ -z "$QUICKLISP_DIST_VERSION" ] || [ "$QUICKLISP_DIST_VERSION" = "latest" ]; then
QUICKLISP_DIST_VERSION=nil
else
QUICKLISP_DIST_VERSION="\"quicklisp/$QUICKLISP_DIST_VERSION\""
fi
if [ -z "$QUICKLISP_CLIENT_VERSION" ] || [ "$QUICKLISP_CLIENT_VERSION" = "latest" ]; then
QUICKLISP_CLIENT_VERSION=nil
else
QUICKLISP_CLIENT_VERSION="\"$QUICKLISP_CLIENT_VERSION\""
fi
abcl --batch \
--load /usr/local/share/common-lisp/source/quicklisp/quicklisp.lisp \
--eval "(quicklisp-quickstart:install :dist-version $QUICKLISP_DIST_VERSION :client-version $QUICKLISP_CLIENT_VERSION)" \
--eval "(when (equalp \"$QUICKLISP_ADD_TO_INIT_FILE\" \"true\") (ql-util:without-prompting (ql:add-to-init-file)))"
......@@ -119,6 +119,9 @@ RUN set -x \
&& rm quicklisp.lisp.asc \
&& rm -rf "$GNUPGHOME"
# Add the script to trivially install Quicklisp
COPY install-quicklisp /usr/local/bin/install-quicklisp
# Add the entrypoint
WORKDIR /
......
#!/bin/sh
if [ -z "$QUICKLISP_DIST_VERSION" ] || [ "$QUICKLISP_DIST_VERSION" = "latest" ]; then
QUICKLISP_DIST_VERSION=nil
else
QUICKLISP_DIST_VERSION="\"quicklisp/$QUICKLISP_DIST_VERSION\""
fi
if [ -z "$QUICKLISP_CLIENT_VERSION" ] || [ "$QUICKLISP_CLIENT_VERSION" = "latest" ]; then
QUICKLISP_CLIENT_VERSION=nil
else
QUICKLISP_CLIENT_VERSION="\"$QUICKLISP_CLIENT_VERSION\""
fi
abcl --batch \
--load /usr/local/share/common-lisp/source/quicklisp/quicklisp.lisp \
--eval "(quicklisp-quickstart:install :dist-version $QUICKLISP_DIST_VERSION :client-version $QUICKLISP_CLIENT_VERSION)" \
--eval "(when (equalp \"$QUICKLISP_ADD_TO_INIT_FILE\" \"true\") (ql-util:without-prompting (ql:add-to-init-file)))"
......@@ -112,6 +112,9 @@ RUN set -x \
&& rm quicklisp.lisp.asc \
&& rm -rf "$GNUPGHOME"
# Add the script to trivially install Quicklisp
COPY install-quicklisp /usr/local/bin/install-quicklisp
# Add the entrypoint
WORKDIR /
......
......@@ -114,6 +114,9 @@ RUN set -x \
&& rm quicklisp.lisp.asc \
&& rm -rf "$GNUPGHOME"
# Add the script to trivially install Quicklisp
COPY install-quicklisp /usr/local/bin/install-quicklisp
# Add the entrypoint
WORKDIR /
......
- [Supported Tags](#org993f32a)
- [Simple Tags](#org53b48aa)
- [Shared Tags](#org53b8acf)
- [Quick Reference](#org527f30d)
- [What is ABCL?](#orga42142e)
- [How to use this iamge](#org1193d10)
- [Create a `Dockerfile` in your ABCL project](#orge347b1c)
- [Run a single Common Lisp script](#org47a5e04)
- [Developing using SLIME](#orga00c0cd)
- [Image variants](#org3471f08)
- [`%%IMAGE%%:<version>`](#org7bb1458)
- [`%%IMAGE%%:<version>-slim`](#org50bc7f4)
- [`%%IMAGE%%:<version>-windowsservercore`](#org39e2f32)
- [License](#org15ed669)
- [Supported Tags](#org3364b47)
- [Simple Tags](#org9771021)
- [Shared Tags](#org32c4fe2)
- [Quick Reference](#org1c6007b)
- [What is ABCL?](#orgb8ba2c3)
- [How to use this iamge](#org2fe1ebb)
- [Create a `Dockerfile` in your ABCL project](#org874a6cf)
- [Run a single Common Lisp script](#orga43af56)
- [Developing using SLIME](#org0c0787a)
- [Image variants](#org2663dc1)
- [`%%IMAGE%%:<version>`](#orgd984448)
- [`%%IMAGE%%:<version>-slim`](#org61a3189)
- [`%%IMAGE%%:<version>-windowsservercore`](#org4b0cc43)
- [License](#org6e67466)
<a id="org993f32a"></a>
<a id="org3364b47"></a>
# Supported Tags
<a id="org53b48aa"></a>
<a id="org9771021"></a>
## Simple Tags
INSERT-SIMPLE-TAGS
<a id="org53b8acf"></a>
<a id="org32c4fe2"></a>
## Shared Tags
INSERT-SHARED-TAGS
<a id="org527f30d"></a>
<a id="org1c6007b"></a>
# Quick Reference
......@@ -45,7 +45,7 @@ INSERT-SHARED-TAGS
- **Supported platforms:** `linux/amd64`, `linux/arm64/v8`, `windows/amd64`
<a id="orga42142e"></a>
<a id="orgb8ba2c3"></a>
# What is ABCL?
......@@ -54,12 +54,12 @@ From [ABCL's Home Page](https://abcl.org)
> Armed Bear Common Lisp (ABCL) is a full implementation of the Common Lisp language featuring both an interpreter and a compiler, running in the JVM. Originally started to be a scripting language for the J editor, it now supports JSR-223 (Java scripting API): it can be a scripting engine in any Java application. Additionally, it can be used to implement (parts of) the application using Java to Lisp integration APIs.
<a id="org1193d10"></a>
<a id="org2fe1ebb"></a>
# How to use this iamge
<a id="orge347b1c"></a>
<a id="org874a6cf"></a>
## Create a `Dockerfile` in your ABCL project
......@@ -78,7 +78,7 @@ $ docker run -it --rm --name my-running-app my-abcl-app
```
<a id="org47a5e04"></a>
<a id="orga43af56"></a>
## Run a single Common Lisp script
......@@ -89,7 +89,7 @@ $ docker run -it --rm --name my-running-script -v "$PWD":/usr/src/app -w /usr/sr
```
<a id="orga00c0cd"></a>
<a id="org0c0787a"></a>
## Developing using SLIME
......@@ -106,14 +106,14 @@ M-x slime-connect RET RET RET
```
<a id="org3471f08"></a>
<a id="org2663dc1"></a>
# Image variants
This image comes in several variants, each designed for a specific use case.
<a id="org7bb1458"></a>
<a id="orgd984448"></a>
## `%%IMAGE%%:<version>`
......@@ -123,17 +123,21 @@ Some of these tags may have names like buster or stretch in them. These are the
This tag attempts to replicate the base environment provided by buildpack-deps. It, by design, has a large number of extremely common Debian packages.
These images contain the quicklisp installer, located at `/usr/local/share/common-lisp/source/quicklisp/quicklisp.lisp`.
These images contain the quicklisp installer, located at `/usr/local/share/common-lisp/source/quicklisp/quicklisp.lisp`. Additionally, there is a script at `/usr/local/bin/install-quicklisp` that will use the bundled installer to install Quicklisp. You can configure the Quicklisp install with the following environment variables:
- **`QUICKLISP_DIST_VERSION`:** The dist version to use. Of the form yyyy-mm-dd. `latest` means to install the latest version (the default).
- **`QUICKLISP_CLIENT_VERSION`:** The client version to use. Of the form yyyy-mm-dd. `latest` means to install the latest version (the default).
- **`QUICKLISP_ADD_TO_INIT_FILE`:** If set to `true`, `(ql:add-to-init-file)` is used to add code to the implementation's user init file to load Quicklisp on startup. Not set by default.
<a id="org50bc7f4"></a>
<a id="org61a3189"></a>
## `%%IMAGE%%:<version>-slim`
This image does not contain the common packages contained in the default tag and only contains the minimal packages needed to run ABCL. Unless you are working in an environment where only this image will be deployed and you have space constraints, we highly recommend using the default image of this repository.
<a id="org39e2f32"></a>
<a id="org4b0cc43"></a>
## `%%IMAGE%%:<version>-windowsservercore`
......@@ -145,7 +149,7 @@ For information about how to get Docker running on Windows, please see the relev
- [Windows 10 Quick Start](https://msdn.microsoft.com/en-us/virtualization/windowscontainers/quick_start/quick_start_windows_10)
<a id="org15ed669"></a>
<a id="org6e67466"></a>
# License
......
......@@ -97,7 +97,18 @@
packages.
These images contain the quicklisp installer, located at
=/usr/local/share/common-lisp/source/quicklisp/quicklisp.lisp=.
=/usr/local/share/common-lisp/source/quicklisp/quicklisp.lisp=. Additionally,
there is a script at =/usr/local/bin/install-quicklisp= that will use the
bundled installer to install Quicklisp. You can configure the Quicklisp
install with the following environment variables:
+ =QUICKLISP_DIST_VERSION= :: The dist version to use. Of the form
yyyy-mm-dd. =latest= means to install the latest version (the default).
+ =QUICKLISP_CLIENT_VERSION= :: The client version to use. Of the form
yyyy-mm-dd. =latest= means to install the latest version (the default).
+ =QUICKLISP_ADD_TO_INIT_FILE= :: If set to =true=, =(ql:add-to-init-file)=
is used to add code to the implementation's user init file to load
Quicklisp on startup. Not set by default.
** =%%IMAGE%%:<version>-slim=
......
#!/bin/sh
if [ -z "$QUICKLISP_DIST_VERSION" ] || [ "$QUICKLISP_DIST_VERSION" = "latest" ]; then
QUICKLISP_DIST_VERSION=nil
else
QUICKLISP_DIST_VERSION="\"quicklisp/$QUICKLISP_DIST_VERSION\""
fi
if [ -z "$QUICKLISP_CLIENT_VERSION" ] || [ "$QUICKLISP_CLIENT_VERSION" = "latest" ]; then
QUICKLISP_CLIENT_VERSION=nil
else
QUICKLISP_CLIENT_VERSION="\"$QUICKLISP_CLIENT_VERSION\""
fi
abcl --batch \
--load /usr/local/share/common-lisp/source/quicklisp/quicklisp.lisp \
--eval "(quicklisp-quickstart:install :dist-version $QUICKLISP_DIST_VERSION :client-version $QUICKLISP_CLIENT_VERSION)" \
--eval "(when (equalp \"$QUICKLISP_ADD_TO_INIT_FILE\" \"true\") (ql-util:without-prompting (ql:add-to-init-file)))"
......@@ -57,6 +57,9 @@ for version in "${versions[@]}"; do
template="apt$variantTag"
cp "abcl-wrapper-jdk$javaVersion" "$dir/abcl-wrapper"
cp docker-entrypoint.sh "$dir/docker-entrypoint.sh"
if [ "$variant" != "slim" ]; then
cp install-quicklisp "$dir/install-quicklisp"
fi
;;
windowsservercore-*)
template='windowsservercore'
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment