Commit 6d6d5579 authored by ale's avatar ale
Browse files

Set up the ai3 debian package repository

And a minimal chaperone config to set up logging and locale.
parent 806022f3
Pipeline #4703 passed with stages
in 3 minutes and 47 seconds
FROM bitnami/minideb:stretch
COPY build.sh /tmp/build.sh
COPY chaperone.conf /etc/chaperone.d/chaperone.conf
RUN /tmp/build.sh && rm /tmp/build.sh
docker-chaperone-base
===
Docker base image with [Chaperone](https://github.com/garywiz/chaperone),
a minimal init daemon for container images.
......@@ -7,3 +8,6 @@ Users of this base image should provide their own chaperone configuration
files and install them in */etc/chaperone.d*, as well as setting the
Docker ENTRY\_POINT to */usr/local/bin/chaperone*.
Since this image is used by most of our containers, it also sets up
the ai3 Debian package repository, so we don't have to add another
dependency for this very common task.
......@@ -21,15 +21,61 @@ if [ "x$(which install_packages)" = "x" ]; then
}
fi
die() {
echo "ERROR: $*" >&2
exit 1
}
set -x
set -e
install_packages ${BUILD_PACKAGES} ${PACKAGES}
# Add the ai3 Debian package repository.
install_packages gnupg \
|| die "could not install gnupg"
apt-key add - <<EOF
-----BEGIN PGP PUBLIC KEY BLOCK-----
Version: GnuPG v1
mQENBFnTxCwBCAC/pTGYdE2A7SZ8QQp8dHIoikKmfAXnIgmPlJAMzGg+gadtxDBC
Bkmy9JW3dWa/oOJSUOUfS61WjBErx7Gkmq5xS1CmREcut6Bl2awuU10MvL01QsDf
Yp0E6IQg4Mw7lhhHd9y4NL2Hu/w7LSXChDWZkcOUo5QIEtd90rMt9AIyReRQEgfb
VHuBbEKorM5oT6ojkRTRXsyf9IBCj5bc5MM5oZfUqEk4WxxWn0+OIajmS6ZmT2p5
lVPadWU6rMwQe1Gw4uGd4TS6hPTVf7FGS14dkyMOmYLOuKmX4ma1/LyYGPWRjd+/
jI7HqdYEMYCyj1VCV3mpTmekfLLSRSHDJ3NVABEBAAG0QEF1dGlzdGljaS9JbnZl
bnRhdGkgKHBhY2thZ2Ugc2lnbmluZyBrZXkpIDxkZWJpYW5AYXV0aXN0aWNpLm9y
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dPYDI+Tj/0qiS51QPVvr6iJicDG4VD4C
poGIJ7xn9ZUQJwaFzWiFrBAOXT6gpwgC9HSa9WGO+GTN87jc+wHPYUOx8k5dhXGO
LgasYtbuTZqP2fzGe2WQFuzf2Ibm5TTbFK8=
=PfHf
-----END PGP PUBLIC KEY BLOCK-----
EOF
echo "deb http://deb.autistici.org/urepo ai3/" \
> /etc/apt/sources.list.d/ai3.list
apt-get -q update
# Install required packages
install_packages ${BUILD_PACKAGES} ${PACKAGES} \
|| die "could not install packages"
# Install Chaperone (minimalistic init service).
pip3 install chaperone
pip3 install chaperone \
|| die "could not install chaperone"
rm -fr /root/.cache/pip
mkdir -p /etc/chaperone.d
# Users of this base image should provide their own Chaperone config.
#cp /tmp/conf/chaperone.conf /etc/chaperone.d/chaperone.conf
......
console.logging: {
selector: '*.info',
stdout: true,
}
settings: {
env_set: {
"LANG": "en_us.UTF-8",
"LC_CTYPE": "$(LANG)",
"LC_COLLATE": "C",
}
}
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment