kore-docker

Official Kore Dockerfiles
Commits | Files | Refs | README | git clone

commit 6765862f3da0801dc2a5d6511e5c7ef9f8eaa114
parent 9ceee807194d4b887dc3efeb08139cfd48f7fe15
Author: Joris Vink <joris@coders.se>
Date:   Mon, 10 May 2021 22:48:03 +0200

Update Dockerfiles.

- Make sure resolv.conf is copied into acme its chroot.
- Make sure ca-certificates bundle is copied into acme its chroot.
- Set STOPSIGNAL

Additionally:

- Add helper scripts to build and push everything for me.

Diffstat:
4.1.0/Dockerfile | 6+++++-
4.1.0/entry.sh | 13+++++++++++++
README.md | 37+++++++++++++++++++++++++++++++++++++
build-4.1.0.sh | 17+++++++++++++++++
build-git.sh | 17+++++++++++++++++
git-master/Dockerfile | 6+++++-
git-master/entry.sh | 13+++++++++++++
7 files changed, 107 insertions(+), 2 deletions(-)

diff --git a/4.1.0/Dockerfile b/4.1.0/Dockerfile @@ -38,5 +38,9 @@ RUN set -e && \ rm -rf kore-4.1.0* && \ apk del .build-deps +COPY entry.sh / + EXPOSE 443 8888 -ENTRYPOINT [ "kore" ] +STOPSIGNAL SIGQUIT + +ENTRYPOINT [ "/entry.sh" ] diff --git a/4.1.0/entry.sh b/4.1.0/entry.sh @@ -0,0 +1,13 @@ +#!/bin/sh + +set -e + +PATH=$PATH:/usr/local/bin + +mkdir -p /var/chroot/acme/etc +mkdir -p /var/chroot/acme/etc/ssl/certs/ + +cp /etc/resolv.conf /var/chroot/acme/etc +cp /etc/ssl/certs/ca-certificates.crt /var/chroot/acme/etc/ssl/certs/ + +exec kore $@ diff --git a/README.md b/README.md @@ -0,0 +1,37 @@ +Official kore docker images. + +# Using base images to create a custom Docker container + +``` +FROM kore/kore:4.1.0 + +WORKDIR /koreapp +COPY *.py . + +EXPOSE 8888 +CMD ["app.py"] +``` + +# Using the base image to run an application + +``` +$ docker run -p 8888:8888 -it --rm \ + -v `pwd`/code:/app \ + -w /app kore/kore:4.1.0 /app/app.py +``` + +# ACME + +The docker images support ACME. If you are going to enable it +you probably want to use a volume of sorts to store the account +key and certificates on persistent storage. + +The keymgr will store all relevant data under the **/var/chroot/keymgr** +path. You can use a volume to export that directory to your host instead. + +``` +$ docker run -p 8888:8888 -it --rm \ + -v `pwd`/code:/app \ + -v `pwd`/keymgr:/var/chroot/keymgr \ + -w /app kore/kore:4.1.0 /app/app.py +``` diff --git a/build-4.1.0.sh b/build-4.1.0.sh @@ -0,0 +1,17 @@ +#!/bin/sh + +set -e + +docker build -t kore/kore:4.1.0-amd64 --platform linux/amd64 4.1.0 +docker push kore/kore:4.1.0-amd64 + +docker build -t kore/kore:4.1.0-arm64 4.1.0 +docker push kore/kore:4.1.0-arm64 + +docker manifest rm kore/kore:4.1.0 + +docker manifest create kore/kore:4.1.0 \ + --amend kore/kore:4.1.0-arm64 \ + --amend kore/kore:4.1.0-amd64 + +docker manifest push kore/kore:4.1.0 diff --git a/build-git.sh b/build-git.sh @@ -0,0 +1,17 @@ +#!/bin/sh + +set -e + +docker build -t kore/kore:git-master-amd64 --platform linux/amd64 git-master +docker push kore/kore:git-master-amd64 + +docker build -t kore/kore:git-master-arm64 git-master +docker push kore/kore:git-master-arm64 + +docker manifest rm kore/kore:git-master + +docker manifest create kore/kore:git-master \ + --amend kore/kore:git-master-arm64 \ + --amend kore/kore:git-master-amd64 + +docker manifest push kore/kore:git-master diff --git a/git-master/Dockerfile b/git-master/Dockerfile @@ -40,5 +40,9 @@ RUN set -e && \ rm -rf kore* && \ apk del .build-deps +COPY entry.sh / + EXPOSE 443 8888 -ENTRYPOINT [ "kore" ] +STOPSIGNAL SIGQUIT + +ENTRYPOINT ["/entry.sh"] diff --git a/git-master/entry.sh b/git-master/entry.sh @@ -0,0 +1,13 @@ +#!/bin/sh + +set -e + +PATH=$PATH:/usr/local/bin + +mkdir -p /var/chroot/acme/etc +mkdir -p /var/chroot/acme/etc/ssl/certs/ + +cp /etc/resolv.conf /var/chroot/acme/etc +cp /etc/ssl/certs/ca-certificates.crt /var/chroot/acme/etc/ssl/certs/ + +exec kore $@