Archived
1
0
Fork 0
This repository has been archived on 2024-01-27. You can view files and clone it, but cannot push or open issues or pull requests.
dockerfiles/agate/Dockerfile
2022-05-01 17:49:19 +02:00

30 lines
761 B
Docker

FROM alpine:latest AS builder
RUN apk add cargo
RUN wget -O source.tar.gz \
$(wget -qO- https://api.github.com/repos/mbrubeck/agate/releases/latest \
| sed -nE 's/^.*"tarball_url"\s*:\s*"([^"]+)".*$/\1/p' \
) \
&& tar xzf source.tar.gz \
&& mv /mbrubeck-agate-* /agate \
&& cd agate \
&& cargo build --release
FROM alpine:latest
RUN apk add --update --no-cache libgcc \
&& mkdir -p /app/.certificates \
&& mkdir /gmi \
&& chown daemon:daemon /app/.certificates
COPY --from=builder /agate/target/release/agate /usr/bin/agate
COPY ./start.sh /app
ENV LANG=en-US \
HOSTNAME=example.com
VOLUME ["/app/.certificates", "/gmi"]
EXPOSE 1965
USER daemon
WORKDIR /app
ENTRYPOINT ["/bin/sh", "start.sh"]