diff --git a/.circleci/config.yml b/.circleci/config.yml index 7a815b6..5e59a88 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -20,6 +20,9 @@ jobs: working_directory: /go/src/github.com/hipages/php-fpm_exporter steps: - checkout + - setup_remote_docker: + docker_layer_caching: true + - run: docker login -u $DOCKER_USER -p $DOCKER_PASS - run: curl -L -s https://github.com/golang/dep/releases/download/v0.4.1/dep-linux-amd64 -o /go/bin/dep && chmod +x /go/bin/dep - run: dep ensure -vendor-only - run: curl -sL https://git.io/goreleaser | bash diff --git a/.goreleaser.yml b/.goreleaser.yml index 4503ca0..35a8200 100644 --- a/.goreleaser.yml +++ b/.goreleaser.yml @@ -7,6 +7,9 @@ builds: goarch: - amd64 +dockers: + - image: hipages/php-fpm_exporter + archive: format_overrides: - goos: windows diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..88598e1 --- /dev/null +++ b/Dockerfile @@ -0,0 +1,8 @@ +FROM alpine:3.5 +LABEL maintainer "hipages DevOps Team " + +COPY php-fpm_exporter /bin/php-fpm_exporter + +EXPOSE 9253 +USER nobody +ENTRYPOINT [ "/bin/php-fpm_exporter", "server" ] \ No newline at end of file