switch dockerfile to scratch

This commit is contained in:
Chris Sexton 2024-06-30 06:32:12 -04:00
parent 2697e6a259
commit 1622557399
1 changed files with 2 additions and 15 deletions

View File

@ -1,12 +1,4 @@
FROM alpine:edge
RUN apk add --no-cache git
RUN apk add --no-cache musl-dev
RUN apk add --no-cache gcc
RUN apk add --no-cache sqlite
RUN apk add --no-cache go
RUN apk add --no-cache perl
RUN apk add --no-cache make
FROM scratch
VOLUME /app/var
VOLUME /app/src
@ -16,9 +8,6 @@ ARG gomaxprocs="8"
WORKDIR /app
ENV SRC_DIR=/app/src/catbase/
RUN mkdir -p $SRC_DIR
ENV TWITCHAUTHORIZATION="OAuth "
ENV TWITCHCLIENTID=""
ENV UNTAPPDTOKEN=""
@ -48,10 +37,8 @@ ENV GOMAXPROCS=8
ADD . $SRC_DIR
RUN apk add --no-cache tzdata
ENV TZ America/New_York
RUN git clone https://github.com/chrissexton/rank-amateur-cowsay.git cowsay && cd cowsay && ./install.sh
RUN cd $SRC_DIR; go get ./...; go build -o /app/catbase
COPY catbase /app/catbase
ENTRYPOINT ["/app/catbase", "-db=/app/var/catbase.db", "-debug"]