76 lines
1.5 KiB
Plaintext
76 lines
1.5 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 "" 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
|
|
|