Skip to content
This repository has been archived by the owner on Mar 18, 2024. It is now read-only.

Add make dockerfile travis #165

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -20,3 +20,5 @@ _cgo_export.*
_testmain.go

*.exe

Godeps/_workspace/
10 changes: 10 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@

language: go

go_import_path: github.com/samalba/dockerclient

go:
- 1.4
- 1.5

script: godep go test -v ./...
8 changes: 8 additions & 0 deletions Dockerfile.build
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@

FROM golang:1.5
RUN mkdir -p /tmp/godep && \
GOPATH=/tmp/godep go get github.com/tools/godep && \
mv /tmp/godep/bin/godep /usr/local/bin/godep && \
rm -rf /tmp/godep

WORKDIR /go/src/github.com/samalba/dockerclient
59 changes: 59 additions & 0 deletions Godeps/Godeps.json

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

5 changes: 5 additions & 0 deletions Godeps/Readme

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

24 changes: 24 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
.PHONY: build shell test-unit


BUILD_ID ?= $(shell git rev-parse --short HEAD 2>/dev/null)
DOCKER_IMAGE := dockerclient-dev:$(BUILD_ID)

VOLUMES := \
-v $(CURDIR):/go/src/github.com/samalba/dockerclient \
-v $(CURDIR)/dist/bin:/go/bin \
-v $(CURDIR)/dist/pkg:/go/pkg

all: binary

build:
docker build -t $(DOCKER_IMAGE) -f Dockerfile.build .

dist:
mkdir dist/

shell: dist build
docker run --rm -ti $(VOLUMES) $(DOCKER_IMAGE) bash

test-unit: build
docker run --rm -ti $(VOLUMES) $(DOCKER_IMAGE) godep go test -v ./...
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
Docker client library in Go
===========================
[![GoDoc](http://godoc.org/github.com/samalba/dockerclient?status.png)](http://godoc.org/github.com/samalba/dockerclient)
[![Build Status](https://travis-ci.org/samalba/dockerclient.svg?branch=master)](https://travis-ci.org/samalba/dockerclient)

Well maintained docker client library.

Expand Down