Configure goreleaser and CircleCI to produce a docker image

This commit is contained in:
Enrico Stahn 2018-02-19 13:07:35 +11:00
parent f56543e484
commit 149cc623d2
No known key found for this signature in database
GPG key ID: 5263621C269A50DE
3 changed files with 14 additions and 0 deletions

View file

@ -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

View file

@ -7,6 +7,9 @@ builds:
goarch:
- amd64
dockers:
- image: hipages/php-fpm_exporter
archive:
format_overrides:
- goos: windows

8
Dockerfile Normal file
View file

@ -0,0 +1,8 @@
FROM alpine:3.5
LABEL maintainer "hipages DevOps Team <syd-team-devops@hipagesgroup.com.au>"
COPY php-fpm_exporter /bin/php-fpm_exporter
EXPOSE 9253
USER nobody
ENTRYPOINT [ "/bin/php-fpm_exporter", "server" ]