Skip to content

Commit

Permalink
Merge pull request gliderlabs#658 from Snapkitchen/PR-568
Browse files Browse the repository at this point in the history
resolve merge conflicts in PR-568 (update vendor libraries to fix tls support)
  • Loading branch information
josegonzalez committed Apr 15, 2019
2 parents 4b918ac + db58a0f commit da90d17
Show file tree
Hide file tree
Showing 8 changed files with 139 additions and 52 deletions.
14 changes: 8 additions & 6 deletions circle.yml → .circleci/config.yml
Original file line number Diff line number Diff line change
@@ -1,9 +1,13 @@
version: 2
jobs:
build:
machine: true
docker:
- image: gliderlabs/ci:build-2
command: ["/bin/bash"]
working_directory: /go/src/github.com/gliderlabs/registrator
steps:
- checkout
- setup_remote_docker
- run:
command: make circleci
- run:
Expand All @@ -14,14 +18,12 @@ jobs:
- deploy:
name: Deploy website
command: |
if [[ "$CIRCLE_BRANCH" == "master" ]]; then
mv .dockerignore .dockerignore-repo
docker run -v /home/circleci/.ssh:/tmp/ssh -v $PWD:/work -e MASTER=$MASTER -e TAG=$TAG gliderlabs/pagebuilder deploy "build $CIRCLE_BUILD_NUM"
mv .dockerignore-repo .dockerignore
if is-branch "master"; then
eval $(docker run gliderlabs/pagebuilder circleci-cmd)
fi
- deploy:
name: Deploy beta channel
command: |
if [[ "$CIRCLE_BRANCH" == "release" ]]; then
if is-branch "release"; then
make release
fi
6 changes: 4 additions & 2 deletions .dockerignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
release
build
.git
.gvm_local
build
release
vendor
5 changes: 3 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
release
.gvm_local
build
vendor
release
vendor
28 changes: 14 additions & 14 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,18 +1,18 @@
FROM alpine:3.7 AS builder
COPY . /go/src/github.com/gliderlabs/registrator
RUN apk --no-cache add -t build-deps build-base go git curl \
&& apk --no-cache add ca-certificates \
&& export GOPATH=/go && mkdir -p /go/bin && export PATH=$PATH:/go/bin \
FROM golang:1.9.4-alpine3.7 AS builder
WORKDIR /go/src/github.com/gliderlabs/registrator/
COPY . .
RUN \
apk add --no-cache curl git \
&& curl https://raw.githubusercontent.com/golang/dep/master/install.sh | sh \
&& cd /go/src/github.com/gliderlabs/registrator \
&& export GOPATH=/go \
&& git config --global http.https://gopkg.in.followRedirects true \
&& dep ensure \
&& go build -ldflags "-X main.Version=$(cat VERSION)" -o /bin/registrator \
&& rm -rf /go \
&& apk del --purge build-deps
&& dep ensure -vendor-only \
&& CGO_ENABLED=0 GOOS=linux go build \
-a -installsuffix cgo \
-ldflags "-X main.Version=$(cat VERSION)" \
-o bin/registrator \
.

FROM alpine:3.7
COPY --from=builder /bin/registrator /bin/registrator
COPY --from=builder /etc/ssl/certs/ca-certificates.crt /etc/ssl/certs/ca-certificates.crt
RUN apk add --no-cache ca-certificates
COPY --from=builder /go/src/github.com/gliderlabs/registrator/bin/registrator /bin/registrator

ENTRYPOINT ["/bin/registrator"]
88 changes: 80 additions & 8 deletions Gopkg.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit da90d17

Please sign in to comment.