Files
husk-milter/docker/MTAContainerFile
T
Malte Meiboom 30b1d29274 Start milestone 3
- Add functionality to query online sources (Keyservers, etc) for
  certificates.
- Use introducers to determine which UserIDs should be fetched from
  online soources. Check certifications before importing certifiactes
  into the local cert store.
- start docker image for local end-to-end testing.
2026-01-23 12:57:26 +01:00

97 lines
2.2 KiB
Plaintext

##
# build e2e tests
##
##
# build hockeypuck (keyserver), as it's not a debian package
##
FROM golang:1.24 AS gobuilder
## install build dependencies
ENV DEBIAN_FRONTEND=noninteractive
RUN apt-get update -yqq && \
apt-get install -yqq \
git \
make
WORKDIR /hockeypuck
RUN git clone https://github.com/hockeypuck/hockeypuck /hockeypuck
RUN make build
#
# the e2e tests need a rust toolchain
#
FROM docker.io/library/rust:latest
ENV DEBIAN_FRONTEND=noninteractive
## ensure language settings
RUN apt-get update -yqq && apt-get install -y locales && rm -rf /var/lib/apt/lists/* \
&& localedef -i en_US -c -f UTF-8 -A /usr/share/locale/locale.alias en_US.UTF-8
ENV LANG=en_US.utf8
## install build dependencies
RUN apt-get update -yqq && \
apt-get install -yqq \
clang \
git \
libclang-dev \
libsqlite3-dev \
libssl-dev \
llvm \
nettle-dev \
pkg-config
##
RUN apt-get update -yqq && \
apt-get install -yqq adduser \
passwd \
bash \
openssh-client \
sudo \
postfix \
rsyslog \
postgresql \
openssl \
sq
RUN adduser --shell /bin/bash --disabled-password --gecos "" user && \
mkdir -p /home/user/ && \
usermod -a -G sudo user && \
chown -R user:user /home/user
RUN adduser --shell /bin/bash --disabled-password --gecos "" alice && \
mkdir -p /home/alice/ && \
chown -R alice:alice /home/alice
RUN adduser --shell /bin/bash --disabled-password --gecos "" bob && \
mkdir -p /home/bob/ && \
chown -R bob:bob /home/bob
RUN adduser --shell /bin/bash --disabled-password --gecos "" carol && \
mkdir -p /home/carol/ && \
chown -R carol:carol /home/carol
RUN adduser --shell /bin/bash --disabled-password --gecos "" dave && \
mkdir -p /home/dave/ && \
chown -R dave:dave /home/dave
RUN adduser --shell /bin/bash --disabled-password --gecos "" hockeypuck
COPY mta_provision/ /
# copy hockeypuck
COPY --from=gobuilder /hockeypuck/bin/hockeypuck /usr/bin/hockeypuck
COPY --from=gobuilder /hockeypuck/contrib/templates/* /var/www/templates/
RUN /usr/bin/gen_hockeypuck.sh example.com 127.0.0.2
# tls certificate for example.com
RUN /usr/bin/gen_tls_cert.sh example.com && \
chown hockeypuck /etc/local_certs/example.com.key
RUN update-ca-certificates