diff options
-rw-r--r-- | .gitlab-ci.yml | 13 | ||||
-rw-r--r-- | Dockerfile | 14 |
2 files changed, 27 insertions, 0 deletions
diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml new file mode 100644 index 0000000..208ed4b --- /dev/null +++ b/.gitlab-ci.yml @@ -0,0 +1,13 @@ +--- +stages: + - build + +build: + stage: build + image: + name: gcr.io/kaniko-project/executor:debug + entrypoint: [""] + script: + - echo "{\"auths\":{\"$CI_REGISTRY\":{\"username\":\"$CI_REGISTRY_USER\",\"password\":\"$CI_REGISTRY_PASSWORD\"}}}" > /kaniko/.docker/config.json + - /kaniko/executor --context ${CI_PROJECT_DIR} --dockerfile Dockerfile --destination ${CI_REGISTRY_IMAGE}:latest + 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"] |