dockerfile continues

This commit is contained in:
Bel LaPointe
2023-03-28 11:21:25 -06:00
parent af8f75bc7c
commit 0b55e46bc1
2 changed files with 14 additions and 2 deletions

View File

@@ -1,3 +1,10 @@
FROM golang:bullseye as mayhem-party-builder
WORKDIR /mayhem-party.d
RUN apt -y update && apt -y install libasound2-dev
COPY git.d/mayhem-party.d/ ./
RUN go build -o /bin/mayhem-party
FROM debian:stable-slim
RUN apt -y update && apt -y upgrade && apt -y install wget
@@ -10,11 +17,16 @@ RUN \
# stt #nogo since i need microphone
# mayhem-party
COPY --from=mayhem-party-builder /bin/mayhem-party /bin/mayhem-party
# sigusr1
# entrypoint
RUN echo 'date' > /entrypoint.sh \
&& echo 'cleanup() { kill -9 $(jobs -p); wait; }; trap cleanup EXIT' >> /entrypoint.sh \
&& echo '( while true; do larynx-server; sleep 5; done ) &' >> /entrypoint.sh \
&& echo 'read' >> /entrypoint.sh
&& echo 'echo running mayhem party; if ! /bin/mayhem-party; then echo mayhem-party failure; exit 1; fi' >> /entrypoint.sh
ENTRYPOINT []
CMD ["bash", "/entrypoint.sh"]