1
0
mirror of https://github.com/mgerb/go-discord-bot synced 2026-01-09 08:32:48 +00:00
Files
go-discord-bot/Dockerfile

28 lines
649 B
Docker

FROM node:16.14-alpine
WORKDIR /home/client
ADD ./client/ /home/client/
RUN npm install
RUN npm run build
FROM golang:1.17-alpine
WORKDIR /home
COPY --from=0 /home/dist /go/src/github.com/mgerb/go-discord-bot/dist
ADD ./server .
RUN apk add --no-cache git alpine-sdk pkgconfig opus-dev opusfile-dev
RUN go build -o /build/bot
RUN go build -o /build/bot-scripts ./scripts
FROM jrottenberg/ffmpeg:4.1-alpine
RUN apk update
RUN apk add ca-certificates opus-dev opusfile-dev
WORKDIR /server
COPY --from=0 /home/dist /server/dist
COPY --from=1 /build/bot /server/bot
COPY --from=1 /build/bot-scripts /server/bot-scripts
ENTRYPOINT ["/server/bot"]