Update to latest chicken version

master
Kai Klingenberg 4 years ago
parent c879e3f7e0
commit aa9e33b18c

@ -4,9 +4,48 @@ Dockerfiles useful for [chicken scheme](https://www.call-cc.org/)
development. An optional custom `chicken-assemble` script is also development. An optional custom `chicken-assemble` script is also
provided, used to build projects in an opinionated, structured way. 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 ## 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 ## `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

@ -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

@ -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 FROM debian:buster
ENV CHICKEN_VERSION 5.1.0 ENV CHICKEN_VERSION 5.2.0
ENV PLATFORM linux ENV PLATFORM linux
RUN apt-get update && \ RUN set -eux; \
apt-get install -y wget build-essential && \ apt-get update; \
wget -qO- https://code.call-cc.org/releases/${CHICKEN_VERSION}/chicken-${CHICKEN_VERSION}.tar.gz | tar xzv && \ apt-get install -y wget build-essential; \
cd /chicken-${CHICKEN_VERSION} && \ wget -qO- https://code.call-cc.org/releases/${CHICKEN_VERSION}/chicken-${CHICKEN_VERSION}.tar.gz | tar xzv; \
make PLATFORM=${PLATFORM} && \ cd /chicken-${CHICKEN_VERSION}; \
make PLATFORM=${PLATFORM} install && \ make PLATFORM=${PLATFORM}; \
make PLATFORM=${PLATFORM} check && \ make PLATFORM=${PLATFORM} install; \
cd / && \ make PLATFORM=${PLATFORM} check; \
cd /; \
rm -rf /chicken-${CHICKEN_VERSION} rm -rf /chicken-${CHICKEN_VERSION}
# install project assembly tool # install project assembly tool

@ -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
Loading…
Cancel
Save