Skip to content

Commit f6e54a6

Browse files
committed
Update to use clfoundation sbcl image.
This change also includes a switch from ADD to RUN curl to get quicklisp. ADD was giving a 'invalid not-modifed Etag' error which kept the image from building.
1 parent 9266bfe commit f6e54a6

File tree

3 files changed

+18
-17
lines changed

3 files changed

+18
-17
lines changed

Dockerfile

Lines changed: 9 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,29 +1,28 @@
1-
## Build the builder image
2-
FROM daewok/sbcl:alpine AS build
3-
RUN apk update && apk upgrade
1+
FROM clfoundation/sbcl:2.1.5-alpine3.13 AS build
2+
RUN apk --no-cache add curl
43

54
# Set working directory
65
WORKDIR /opt/representer
7-
env HOME /opt/representer
6+
ENV HOME=/opt/representer
87

98
# Pull down the latest Quicklisp
10-
ADD https://beta.quicklisp.org/quicklisp.lisp quicklisp/
9+
RUN mkdir build && curl https://beta.quicklisp.org/quicklisp.lisp -o build/quicklisp.lisp
1110

12-
# install quicklisp
11+
# Install quicklisp
1312
COPY build/install-quicklisp.lisp build/
1413
RUN sbcl --script build/install-quicklisp.lisp
1514

16-
# build the application
15+
# Build the application
1716
COPY build/build.lisp build/
1817
COPY src quicklisp/local-projects/representer
1918
RUN sbcl --script ./build/build.lisp
2019

21-
## Build the runtime image
22-
FROM alpine
20+
# Build the runtime image
21+
FROM alpine:3.13
2322
WORKDIR /opt/representer
2423

2524
# Copy over the representer code
26-
COPY --from=build /opt/representer/representer bin/
25+
COPY --from=build /opt/representer/bin/ bin/
2726
COPY bin/run.sh bin/
2827

2928
# Set representer script as the ENTRYPOINT

build/build.lisp

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,10 @@
1-
(load "quicklisp/setup")
1+
(load "quicklisp/setup.lisp")
22
(ql:quickload "representer")
33

4-
(sb-ext:save-lisp-and-die "representer"
5-
:toplevel #'(lambda ()
6-
(apply #'representer/main:main
7-
(uiop:command-line-arguments)))
8-
:executable t)
4+
(let ((bin-dir (make-pathname :directory '(:relative "bin"))))
5+
(ensure-directories-exist bin-dir)
6+
(sb-ext:save-lisp-and-die (merge-pathnames "representer" bin-dir)
7+
:toplevel #'(lambda ()
8+
(apply #'representer/main:main
9+
(uiop:command-line-arguments)))
10+
:executable t))

build/install-quicklisp.lisp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
1-
(load "quicklisp/quicklisp.lisp")
1+
(load "build/quicklisp.lisp")
22
(quicklisp-quickstart:install)

0 commit comments

Comments
 (0)