2021-12-06 16:25:19 +00:00
|
|
|
FROM luzifer/archlinux as builder
|
2020-12-21 00:54:14 +00:00
|
|
|
|
|
|
|
COPY . /go/src/github.com/Luzifer/twitch-bot
|
|
|
|
WORKDIR /go/src/github.com/Luzifer/twitch-bot
|
|
|
|
|
2021-12-06 16:25:19 +00:00
|
|
|
ENV CGO_ENABLED=0 \
|
2022-01-20 00:22:35 +00:00
|
|
|
GOPATH=/go \
|
|
|
|
NODE_ENV=production
|
2021-08-19 15:18:37 +00:00
|
|
|
|
2020-12-21 00:54:14 +00:00
|
|
|
RUN set -ex \
|
2021-12-06 16:25:19 +00:00
|
|
|
&& pacman -Syy --noconfirm \
|
2021-09-22 13:36:45 +00:00
|
|
|
curl \
|
|
|
|
git \
|
2021-12-06 16:25:19 +00:00
|
|
|
go \
|
2021-09-22 13:36:45 +00:00
|
|
|
make \
|
2021-12-06 16:25:19 +00:00
|
|
|
nodejs-lts-fermium \
|
|
|
|
npm \
|
2021-09-22 13:36:45 +00:00
|
|
|
&& make frontend \
|
2020-12-21 00:54:14 +00:00
|
|
|
&& go install \
|
|
|
|
-ldflags "-X main.version=$(git describe --tags --always || echo dev)" \
|
|
|
|
-mod=readonly
|
|
|
|
|
2021-12-06 16:25:19 +00:00
|
|
|
|
2020-12-21 00:54:14 +00: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 22:11:59 +00:00
|
|
|
bash \
|
2021-01-10 21:30:16 +00:00
|
|
|
ca-certificates \
|
|
|
|
curl \
|
2021-05-06 13:14:58 +00:00
|
|
|
jq \
|
|
|
|
tzdata
|
2020-12-21 00:54:14 +00: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:
|