-
Notifications
You must be signed in to change notification settings - Fork 2
/
Dockerfile-amazonlinux1
48 lines (39 loc) · 1.7 KB
/
Dockerfile-amazonlinux1
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
FROM amazonlinux:2
RUN mkdir /work
WORKDIR /work
RUN yum install -y zip bzip2 \
&& rm -rf /var/cache/yum/* \
&& yum clean all
## Get SBCL and install it to /usr/local/bin/sbcl
ARG SBCL_BIN=sbcl-1.5.0-x86-64-linux
RUN curl -s -f -O -L http://prdownloads.sourceforge.net/sbcl/$SBCL_BIN-binary.tar.bz2 \
&& tar xvf $SBCL_BIN-binary.tar.bz2 \
&& rm $SBCL_BIN-binary.tar.bz2 \
&& (cd $SBCL_BIN; sh install.sh) \
&& rm -r $SBCL_BIN
# Get the quicklisp bootstrap and install it.
RUN curl -s -f -O "https://beta.quicklisp.org/quicklisp.lisp" \
&& /usr/local/bin/sbcl --non-interactive \
--load "quicklisp.lisp" \
--eval "(quicklisp-quickstart:install)" \
--eval "(ql-util:without-prompting (ql:add-to-init-file))" \
&& rm quicklisp.lisp
## Install some libs into the local quicklisp repository.
## To get quicklisp libs at build time, I use 'ql:quickload'.
# Assign WORKDIR as a local repository
RUN echo "(push #P\"/work/\" ql:*local-project-directories*)" >>$HOME/.sbclrc
# 'aws-lambda-function-util'
COPY aws-lambda-function-util /work/aws-lambda-function-util/
RUN /usr/local/bin/sbcl --non-interactive \
--eval "(ql:quickload '#:aws-lambda-function-util)" \
--eval "(mapc #'ql-dist:clean (ql-dist:all-dists))"
# 'aws-lambda-runtime'
COPY aws-lambda-runtime /work/aws-lambda-runtime/
RUN /usr/local/bin/sbcl --non-interactive \
--eval "(ql:quickload '#:aws-lambda-runtime)" \
--eval "(mapc #'ql-dist:clean (ql-dist:all-dists))"
# install some additional libs
COPY aws-lambda-runtime-additional-libraries /work/aws-lambda-runtime-additional-libraries/
RUN /usr/local/bin/sbcl --non-interactive \
--eval "(ql:quickload '#:aws-lambda-runtime-additional-libraries)" \
--eval "(mapc #'ql-dist:clean (ql-dist:all-dists))"