1
0
Fork 0

Initial import

This commit is contained in:
Daniele Tricoli 2022-08-25 22:11:29 +02:00
commit dee8fe8031
1 changed files with 27 additions and 0 deletions

27
Dockerfile Normal file
View File

@ -0,0 +1,27 @@
FROM alpine:3.16 as builder
ENV GOATCOUNTER_VERSION v2.2.3
ENV GOATCOUNTER_TARBALL_SHA256SUM 0548a529ecd564915a8b8058674ea3e59e12d9dea9fd3717960d3bec09ae46d6
RUN apk --no-cache add gzip
WORKDIR /opt
ADD https://github.com/arp242/goatcounter/releases/download/${GOATCOUNTER_VERSION}/goatcounter-dev-linux-amd64.gz goatcounter.gz
RUN sha256sum goatcounter.gz | grep -q ${GOATCOUNTER_TARBALL_SHA256SUM} && \
gunzip goatcounter.gz && \
chmod a+x goatcounter
FROM alpine:3.16
COPY --from=builder /opt/goatcounter /usr/local/bin/goatcounter
RUN addgroup -S -g 1000 goatcounter && adduser -S -D -H -u 1000 goatcounter -G goatcounter
RUN mkdir /data
USER goatcounter
ENTRYPOINT goatcounter serve -listen 0.0.0.0:5000 -automigrate -tls none -db "$DATABASE_URL"