Skip to content
Snippets Groups Projects
Commit 6f4f781e authored by micah's avatar micah :speech_balloon:
Browse files

Move to s6.

Chaperone as an init system is no longer maintained. Float has standardized on
s6 as a replacement. This changes the menshen container to work with s6, in a
simplified way.
parent cc604eac
No related branches found
No related tags found
1 merge request!11Add a load balancer
Pipeline #79124 passed
**/.git
menshen
./menshen
.*.swp
.*.swo
FROM debian:bullseye AS build
FROM debian:bullseye as build
RUN apt-get -q update \
&& DEBIAN_FRONTEND=noninteractive apt-get -qy install --no-install-recommends \
ca-certificates \
build-essential \
pkg-config \
golang-go \
&& apt-get clean \
&& rm -rf /var/lib/apt/lists/*
RUN apt-get update && env DEBIAN_FRONTEND=noninteractive apt-get install -y \
--no-install-recommends \
build-essential \
pkg-config \
golang-go \
git \
ca-certificates \
&& rm -rf /var/lib/apt/lists/*
ADD . /src
RUN cd /src && go build -o menshen && strip menshen
WORKDIR /src
COPY . .
RUN go build -o /out/menshen .
FROM registry.git.autistici.org/ai3/docker/s6-base
RUN apt-get -q update \
&& DEBIAN_FRONTEND=noninteractive apt-get -qy install --no-install-recommends \
ca-certificates \
&& apt-get clean \
&& rm -rf /var/lib/apt/lists/*
FROM registry.git.autistici.org/ai3/docker/chaperone-base AS bin
COPY --from=build /out/menshen /usr/local/bin/menshen
COPY chaperone.d/ /etc/chaperone.d
ENTRYPOINT ["/usr/local/bin/chaperone"]
COPY --from=build /src/menshen /usr/local/bin/menshen
COPY docker/conf/ /etc/
menshen.service: {
command: "/usr/local/bin/menshen -notls",
exit_kills: true
}
#!/bin/sh
#
# Install script for clamav inside a Docker container.
#
# Packages that are only used to build the container. These will be
# removed once we're done.
BUILD_PACKAGES="ca-certificates \
build-essential \
pkg-config \
golang-go \
git"
# The default bitnami/minideb image defines an 'install_packages'
# command which is just a convenient helper. Define our own in
# case we are using some other Debian image.
if [ "x$(which install_packages)" = "x" ]; then
install_packages() {
env DEBIAN_FRONTEND=noninteractive apt-get install -qy -o Dpkg::Options::="--force-confdef" -o Dpkg::Options::="--force-confold" --no-install-recommends "$@"
}
fi
set -x
set -e
umask 022
apt-get -q update
install_packages ${BUILD_PACKAGES}
# Remove packages used for installation.
apt-get remove -y --purge ${BUILD_PACKAGES}
apt-get autoremove -y
apt-get clean
rm -fr /var/lib/apt/lists/*
rm -fr /tmp/conf
#!/usr/bin/execlineb -S0
s6-svscanctl -t /var/run/s6/services
#!/bin/sh
exec /usr/local/bin/menshen -notls
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment