diff options
author | micah <micah@riseup.net> | 2019-10-10 15:20:15 -0700 |
---|---|---|
committer | micah <micah@riseup.net> | 2019-10-10 15:20:15 -0700 |
commit | d5b14a33a8b327a02f43438b1e3020440e3b5b21 (patch) | |
tree | b813eb029ce8432ed1c3521b6a068fb69204addb /Dockerfile | |
parent | db6c96a0060375bb9655a45fb766a63ffd479b2f (diff) |
Add Dockerfile and .gitlab-ci.yaml
Diffstat (limited to 'Dockerfile')
-rw-r--r-- | Dockerfile | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..51823c5 --- /dev/null +++ b/Dockerfile @@ -0,0 +1,14 @@ +FROM debian:stable AS build +RUN echo 'deb http://deb.debian.org/debian buster contrib' > /etc/apt/sources.list.d/contrib.list +RUN apt-get -q update && env DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends build-essential pkg-config golang-go git ca-certificates geoipupdate + +ENV GOPATH=/go +RUN mkdir $GOPATH && \ + go get 0xacab.org/leap/getmyip && \ + strip $GOPATH/bin/getmyip + +FROM debian:stable +COPY --from=build /usr/share/doc/geoipupdate/examples/GeoIP.conf.default /etc/GeoIP.conf +COPY --from=build /go/bin/getmyip /usr/local/bin/getmyip + +ENTRYPOINT ["/usr/local/bin/getmyip -notls"] |