-
Notifications
You must be signed in to change notification settings - Fork 11
/
Dockerfile.voice
32 lines (20 loc) · 1.3 KB
/
Dockerfile.voice
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
FROM alpine as steunaudio
RUN apk add --no-cache git
RUN git clone https://github.com/itfactory-tm/itf-steunt-je.git /steun
FROM golang:1.21 as build
RUN apt-get update && apt-get install -y libsox-dev libsdl2-dev portaudio19-dev libopusfile-dev libopus-dev git
COPY ./ /go/src/github.com/itfactory-tm/thomas-bot
WORKDIR /go/src/github.com/itfactory-tm/thomas-bot
RUN go build -ldflags "-X main.revision=$(git rev-parse --short HEAD)" ./cmd/john/
FROM ubuntu:22.04
ENV DEBIAN_FRONTEND noninteractive
RUN apt-get update && apt-get install -y libsox-dev libsdl2-dev portaudio19-dev libopusfile-dev libopus-dev curl
RUN mkdir -p /go/src/github.com/itfactory-tm/thomas-bot/thomas-bot
WORKDIR /go/src/github.com/itfactory-tm/thomas-bot/thomas-bot
COPY --from=steunaudio /steun/audio /go/src/github.com/itfactory-tm/thomas-bot/thomas-bot/sounds
COPY ./sounds/clapping2.wav /go/src/github.com/itfactory-tm/thomas-bot/thomas-bot/sounds/clapping2.wav
COPY ./sounds/clappingmono.wav /go/src/github.com/itfactory-tm/thomas-bot/thomas-bot/sounds/clappingmono.wav
COPY ./www /go/src/github.com/itfactory-tm/thomas-bot/thomas-bot/www
COPY --from=build /go/src/github.com/itfactory-tm/thomas-bot/john /usr/local/bin/
COPY ./config.json /go/src/github.com/itfactory-tm/thomas-bot/thomas-bot/
CMD [ "/usr/local/bin/john", "voice" ]