FROM alpine:latest

RUN apk add --no-cache curl

WORKDIR /data
VOLUME /data

COPY --chmod=555 docker/ipinfo-geoipupdate.sh /usr/local/bin/ipinfo-geoipupdate.sh

LABEL org.opencontainers.image.description="IPinfo database updater"
HEALTHCHECK --interval=20s CMD test -f /tmp/healthy
CMD ["/usr/local/bin/ipinfo-geoipupdate.sh"]
