Update to latest chicken version
This commit is contained in:
41
README.md
41
README.md
@@ -4,9 +4,48 @@ Dockerfiles useful for [chicken scheme](https://www.call-cc.org/)
|
||||
development. An optional custom `chicken-assemble` script is also
|
||||
provided, used to build projects in an opinionated, structured way.
|
||||
|
||||
You may pick a flavour built on top of popular linux distros:
|
||||
|
||||
```bash
|
||||
docker pull plotter/chicken-scheme:5.2.0-alpine
|
||||
docker pull plotter/chicken-scheme:5.2.0-debian
|
||||
docker pull plotter/chicken-scheme:5.2.0-ubuntu
|
||||
docker pull plotter/chicken-scheme:5.2.0-centos
|
||||
```
|
||||
|
||||
## How to use these images
|
||||
|
||||
TODO write decent examples
|
||||
Mount your source code directory into a running container to access
|
||||
chicken's REPL and/or compiler:
|
||||
|
||||
```bash
|
||||
docker run --rm -it --workdir /src -v $(pwd):/src plotter/chicken-scheme
|
||||
```
|
||||
|
||||
For truly static builds, prefer the `alpine` base image and set the
|
||||
proper compiler and linker flags:
|
||||
|
||||
```dockerfile
|
||||
FROM plotter/chicken-scheme:5.2.0-alpine
|
||||
WORKDIR /src
|
||||
COPY . .
|
||||
RUN csc ... TODO write proper compilation instruction
|
||||
ENTRYPOINT ["/src/main"]
|
||||
```
|
||||
|
||||
You may also choose to build a barebones `scratch` image containing
|
||||
only the desired binary:
|
||||
|
||||
```dockerfile
|
||||
FROM plotter/chicken-scheme:5.2.0-alpine as build
|
||||
WORKDIR /src
|
||||
COPY . .
|
||||
RUN csc ... TODO write proper compilation instruction
|
||||
|
||||
FROM scratch
|
||||
COPY --from=build /src/app /bin/app
|
||||
ENTRYPOINT ["/bin/app"]
|
||||
```
|
||||
|
||||
## `chicken-assemble`-based projects
|
||||
|
||||
|
||||
@@ -1,22 +0,0 @@
|
||||
FROM alpine:3.11
|
||||
|
||||
ENV CHICKEN_VERSION 5.1.0
|
||||
ENV PLATFORM linux
|
||||
|
||||
RUN apk update && \
|
||||
apk --no-cache --update add build-base && \
|
||||
wget -qO- https://code.call-cc.org/releases/$CHICKEN_VERSION/chicken-$CHICKEN_VERSION.tar.gz | tar xzv && \
|
||||
cd /chicken-$CHICKEN_VERSION && \
|
||||
make PLATFORM=$PLATFORM && \
|
||||
make PLATFORM=$PLATFORM install && \
|
||||
make PLATFORM=$PLATFORM check && \
|
||||
cd / && \
|
||||
rm -rf /chicken-$CHICKEN_VERSION
|
||||
|
||||
# install project assembly tool
|
||||
COPY chicken-assemble.scm /usr/bin/chicken-assemble
|
||||
RUN chicken-install clojurian:3 \
|
||||
records \
|
||||
srfi-1 \
|
||||
srfi-69 && \
|
||||
chmod a+x /usr/bin/chicken-assemble
|
||||
23
dockerfiles/alpine.Dockerfile
Normal file
23
dockerfiles/alpine.Dockerfile
Normal file
@@ -0,0 +1,23 @@
|
||||
FROM alpine:3.12
|
||||
|
||||
ENV CHICKEN_VERSION 5.2.0
|
||||
ENV PLATFORM linux
|
||||
|
||||
RUN set -eux; \
|
||||
apk update; \
|
||||
apk --no-cache --update add build-base; \
|
||||
wget -qO- https://code.call-cc.org/releases/${CHICKEN_VERSION}/chicken-${CHICKEN_VERSION}.tar.gz | tar xzv; \
|
||||
cd /chicken-${CHICKEN_VERSION}; \
|
||||
make PLATFORM=${PLATFORM}; \
|
||||
make PLATFORM=${PLATFORM} install; \
|
||||
make PLATFORM=${PLATFORM} check; \
|
||||
cd /; \
|
||||
rm -rf /chicken-${CHICKEN_VERSION}
|
||||
|
||||
# install project assembly tool
|
||||
COPY chicken-assemble.scm /usr/bin/chicken-assemble
|
||||
RUN chicken-install clojurian:3 \
|
||||
records \
|
||||
srfi-1 \
|
||||
srfi-69 && \
|
||||
chmod a+x /usr/bin/chicken-assemble
|
||||
23
dockerfiles/centos.Dockerfile
Normal file
23
dockerfiles/centos.Dockerfile
Normal file
@@ -0,0 +1,23 @@
|
||||
FROM centos:8
|
||||
|
||||
ENV CHICKEN_VERSION 5.2.0
|
||||
ENV PLATFORM linux
|
||||
|
||||
RUN set -eux; \
|
||||
yum install -y gcc gcc-c++ make diffutils; \
|
||||
yum clean all; \
|
||||
curl -sS https://code.call-cc.org/releases/${CHICKEN_VERSION}/chicken-${CHICKEN_VERSION}.tar.gz | tar xzv; \
|
||||
cd /chicken-${CHICKEN_VERSION}; \
|
||||
make PLATFORM=${PLATFORM}; \
|
||||
make PLATFORM=${PLATFORM} install; \
|
||||
make PLATFORM=${PLATFORM} check; \
|
||||
cd /; \
|
||||
rm -rf /chicken-${CHICKEN_VERSION}
|
||||
|
||||
# install project assembly tool
|
||||
COPY chicken-assemble.scm /usr/bin/chicken-assemble
|
||||
RUN chicken-install clojurian:3 \
|
||||
records \
|
||||
srfi-1 \
|
||||
srfi-69 && \
|
||||
chmod a+x /usr/bin/chicken-assemble
|
||||
@@ -1,16 +1,17 @@
|
||||
FROM debian:buster
|
||||
|
||||
ENV CHICKEN_VERSION 5.1.0
|
||||
ENV CHICKEN_VERSION 5.2.0
|
||||
ENV PLATFORM linux
|
||||
|
||||
RUN apt-get update && \
|
||||
apt-get install -y wget build-essential && \
|
||||
wget -qO- https://code.call-cc.org/releases/${CHICKEN_VERSION}/chicken-${CHICKEN_VERSION}.tar.gz | tar xzv && \
|
||||
cd /chicken-${CHICKEN_VERSION} && \
|
||||
make PLATFORM=${PLATFORM} && \
|
||||
make PLATFORM=${PLATFORM} install && \
|
||||
make PLATFORM=${PLATFORM} check && \
|
||||
cd / && \
|
||||
RUN set -eux; \
|
||||
apt-get update; \
|
||||
apt-get install -y wget build-essential; \
|
||||
wget -qO- https://code.call-cc.org/releases/${CHICKEN_VERSION}/chicken-${CHICKEN_VERSION}.tar.gz | tar xzv; \
|
||||
cd /chicken-${CHICKEN_VERSION}; \
|
||||
make PLATFORM=${PLATFORM}; \
|
||||
make PLATFORM=${PLATFORM} install; \
|
||||
make PLATFORM=${PLATFORM} check; \
|
||||
cd /; \
|
||||
rm -rf /chicken-${CHICKEN_VERSION}
|
||||
|
||||
# install project assembly tool
|
||||
23
dockerfiles/ubuntu.Dockerfile
Normal file
23
dockerfiles/ubuntu.Dockerfile
Normal file
@@ -0,0 +1,23 @@
|
||||
FROM ubuntu:focal
|
||||
|
||||
ENV CHICKEN_VERSION 5.2.0
|
||||
ENV PLATFORM linux
|
||||
|
||||
RUN set -eux; \
|
||||
apt-get update; \
|
||||
apt-get install -y wget build-essential; \
|
||||
wget -qO- https://code.call-cc.org/releases/${CHICKEN_VERSION}/chicken-${CHICKEN_VERSION}.tar.gz | tar xzv; \
|
||||
cd /chicken-${CHICKEN_VERSION}; \
|
||||
make PLATFORM=${PLATFORM}; \
|
||||
make PLATFORM=${PLATFORM} install; \
|
||||
make PLATFORM=${PLATFORM} check; \
|
||||
cd /; \
|
||||
rm -rf /chicken-${CHICKEN_VERSION}
|
||||
|
||||
# install project assembly tool
|
||||
COPY chicken-assemble.scm /usr/bin/chicken-assemble
|
||||
RUN chicken-install clojurian:3 \
|
||||
records \
|
||||
srfi-1 \
|
||||
srfi-69 && \
|
||||
chmod a+x /usr/bin/chicken-assemble
|
||||
Reference in New Issue
Block a user