Skip to content

Commit

Permalink
Configure goreleaser and CircleCI to produce a docker image
Browse files Browse the repository at this point in the history
  • Loading branch information
estahn committed Feb 19, 2018
1 parent f56543e commit 149cc62
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 0 deletions.
3 changes: 3 additions & 0 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
3 changes: 3 additions & 0 deletions .goreleaser.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,9 @@ builds:
goarch:
- amd64

dockers:
- image: hipages/php-fpm_exporter

archive:
format_overrides:
- goos: windows
Expand Down
8 changes: 8 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
FROM alpine:3.5
LABEL maintainer "hipages DevOps Team <[email protected]>"

COPY php-fpm_exporter /bin/php-fpm_exporter

EXPOSE 9253
USER nobody
ENTRYPOINT [ "/bin/php-fpm_exporter", "server" ]

0 comments on commit 149cc62

Please sign in to comment.