2021-12-06 17:25:19 +01:00
|
|
|
FROM luzifer/archlinux as builder
|
2020-12-21 01:54:14 +01:00
|
|
|
|
|
|
|
COPY . /go/src/github.com/Luzifer/twitch-bot
|
|
|
|
WORKDIR /go/src/github.com/Luzifer/twitch-bot
|
|
|
|
|
2021-12-06 17:25:19 +01:00
|
|
|
ENV CGO_ENABLED=0 \
|
2022-01-20 01:22:35 +01:00
|
|
|
GOPATH=/go \
|
|
|
|
NODE_ENV=production
|
2021-08-19 17:18:37 +02:00
|
|
|
|
2020-12-21 01:54:14 +01:00
|
|
|
RUN set -ex \
|
2021-12-06 17:25:19 +01:00
|
|
|
&& pacman -Syy --noconfirm \
|
2021-09-22 15:36:45 +02:00
|
|
|
curl \
|
|
|
|
git \
|
2021-12-06 17:25:19 +01:00
|
|
|
go \
|
2021-09-22 15:36:45 +02:00
|
|
|
make \
|
2022-02-26 17:26:02 +01:00
|
|
|
nodejs-lts-gallium \
|
2021-12-06 17:25:19 +01:00
|
|
|
npm \
|
2021-09-22 15:36:45 +02:00
|
|
|
&& make frontend \
|
2020-12-21 01:54:14 +01:00
|
|
|
&& go install \
|
2022-02-26 14:59:02 +01:00
|
|
|
-trimpath \
|
|
|
|
-mod=readonly \
|
|
|
|
-modcacherw \
|
|
|
|
-ldflags "-X main.version=$(git describe --tags --always || echo dev)"
|
2020-12-21 01:54:14 +01:00
|
|
|
|
2021-12-06 17:25:19 +01:00
|
|
|
|
2020-12-21 01:54:14 +01:00
|
|
|
FROM alpine:latest
|
|
|
|
|
|
|
|
LABEL maintainer "Knut Ahlers <knut@ahlers.me>"
|
|
|
|
|
|
|
|
ENV CONFIG=/data/config.yaml \
|
|
|
|
STORAGE_FILE=/data/store.json.gz
|
|
|
|
|
|
|
|
RUN set -ex \
|
|
|
|
&& apk --no-cache add \
|
2021-01-10 23:11:59 +01:00
|
|
|
bash \
|
2021-01-10 22:30:16 +01:00
|
|
|
ca-certificates \
|
|
|
|
curl \
|
2021-05-06 15:14:58 +02:00
|
|
|
jq \
|
|
|
|
tzdata
|
2020-12-21 01:54:14 +01:00
|
|
|
|
|
|
|
COPY --from=builder /go/bin/twitch-bot /usr/local/bin/twitch-bot
|
|
|
|
|
|
|
|
VOLUME ["/data"]
|
|
|
|
|
|
|
|
ENTRYPOINT ["/usr/local/bin/twitch-bot"]
|
|
|
|
CMD ["--"]
|
|
|
|
|
|
|
|
# vim: set ft=Dockerfile:
|