This commit is contained in:
parent
3b7a769021
commit
6b610aaa84
22
Dockerfile
22
Dockerfile
|
@ -1,24 +1,14 @@
|
|||
FROM alpine
|
||||
WORKDIR /
|
||||
FROM alpine:3.18
|
||||
ADD . /hermes
|
||||
WORKDIR /hermes
|
||||
RUN apk add -t hermes-build-deps --no-cache perl graphviz doxygen gcc make openssl-dev libspf2-dev cmake g++ sqlite-dev gettext-dev
|
||||
RUN apk add --no-cache perl graphviz doxygen gcc make openssl-dev libspf2-dev cmake g++ sqlite-dev gettext-dev
|
||||
RUN cmake -B build
|
||||
RUN cmake --build build
|
||||
RUN mkdir /hermes-installation
|
||||
RUN cmake --install build --prefix /hermes-installation
|
||||
|
||||
FROM alpine
|
||||
FROM alpine:3.18
|
||||
EXPOSE 25
|
||||
COPY --from=0 /hermes-installation /
|
||||
WORKDIR /
|
||||
RUN apk add --no-cache openssl libspf2 sqlite-libs libstdc++ libgcc && \
|
||||
mkdir /etc/hermes && \
|
||||
apk add --no-cache openssl libspf2 sqlite-libs libstdc++ libgcc && \
|
||||
openssl genrsa 1024 > /etc/hermes/hermes.key && \
|
||||
openssl req -new -x509 -nodes -sha1 -days 365 -subj /C=SE/ST=State/L=Location/O=Organization/OU=Unit/CN=commonname.com -key /etc/hermes/hermes.key > /etc/hermes/hermes.cert
|
||||
COPY --from=0 /hermes/dists/hermesrc.example /etc/hermes/hermesrc
|
||||
RUN sed -e "s#background = true#background = false#" -i /etc/hermes/hermesrc && \
|
||||
mkdir /var/hermes && \
|
||||
chown nobody:nobody -R /var/hermes
|
||||
CMD ["hermes", "/etc/hermes/hermesrc"]
|
||||
COPY --from=0 /hermes-installation /hermes
|
||||
RUN apk add --no-cache openssl libspf2 sqlite-libs libstdc++ libgcc
|
||||
CMD ["/hermes/bin/hermes", "/config/hermesrc"]
|
||||
|
|
Loading…
Reference in a new issue