diff --git a/Dockerfile b/Dockerfile index c1ca911..4809204 100644 --- a/Dockerfile +++ b/Dockerfile @@ -2,5 +2,6 @@ FROM gerbil/alpine RUN gxpkg install github.com/dlozeve/fancy -COPY sncf.ss . -RUN gxc -exe -static -cc-options -static -ld-options -lz -o sncf sncf.ss +COPY . . +RUN ./build.ss +RUN gxc -exe -static -cc-options -static -ld-options -lz -o sncf-static sncf.ss diff --git a/README.org b/README.org index d18cc73..75c6f83 100644 --- a/README.org +++ b/README.org @@ -64,8 +64,9 @@ Arguments: *** Static executable using Docker -The build script will use Docker to build a fully static executable. -The Dockerfile is based on the [[https://hub.docker.com/r/gerbil/alpine][gerbil/alpine]] image. +The build script will use Docker to build a fully static executable +=sncf-static= in the current directory. The Dockerfile is based on +the [[https://hub.docker.com/r/gerbil/alpine][gerbil/alpine]] image. #+begin_src sh ./build.sh diff --git a/build.sh b/build.sh index 4d22343..838612b 100755 --- a/build.sh +++ b/build.sh @@ -4,5 +4,5 @@ set -eux docker build . -t dlozeve/sncf-bot CONTAINER_ID=$(docker run -d dlozeve/sncf-bot) -docker cp "$CONTAINER_ID":/src/sncf . +docker cp "$CONTAINER_ID":/src/sncf-static sncf-static docker rm -f "$CONTAINER_ID"