Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
29 commits
Select commit Hold shift + click to select a range
936928f
Migrate Godeps/_workspace/ to vendor/
Oct 13, 2016
875efba
Reinstate MAINTAINER and LABEL, Ubuntu base image required by dockerc…
Oct 13, 2016
c4efc83
Improve error handling
Oct 13, 2016
02bca8d
Improve error reporting
Oct 13, 2016
25f1fee
Private registry authentication distinct from host
Oct 13, 2016
99ed959
Port client lib from samalba/dockerclient to docker/docker/client
Oct 13, 2016
ed035d6
go fmt
Oct 13, 2016
e011d3e
Discard obsolete samalba/dockerclient library and dependent tests
Oct 13, 2016
61ac18f
Ignore build output (watchtower binary)
Oct 13, 2016
b13e6af
Migrate from codegangsta lib to urfave
Oct 13, 2016
da9ba69
Updating dependencies with
Oct 13, 2016
97214b2
Consistent context
Oct 13, 2016
4771857
godep doesn't work, distro required
Oct 13, 2016
69db640
godeps doesn't work, go without
Oct 13, 2016
42fea79
Rework TLS support, remove unsupported options
Oct 14, 2016
8f13706
bdehamer/golang-builder doesn't work, use centurylink/golang-builder …
Oct 14, 2016
2386d18
Build instructions for contributors (because it's not obvious)
Oct 14, 2016
e8f6db2
Build instructions for contributors (because it's not obvious)
Oct 14, 2016
44dbd88
Merge branch 'auth' of github.com:rosscado/watchtower into auth
Oct 14, 2016
ef430b7
Add auth config, registry auth fails silently without
Oct 18, 2016
1c59200
Registry authentication was failing silently when pulling images.
Oct 18, 2016
5412642
Cannot load host Docker config from container. Remove option and rely…
Oct 18, 2016
e752364
When authentication credentials are supplied as env vars they are alw…
Oct 18, 2016
6a56597
Refactor port mapping functions for build simplicity
Nov 7, 2016
5a03b65
Automatically push rosscado/watchtower:auth branch to rosscado/watcht…
Nov 8, 2016
952e720
Change image name to push to rosscado/watchtower
rosscado Nov 7, 2016
79320bb
Automatically deploy from hub branch to rosscado/watchtower docker hu…
Nov 7, 2016
dad5d58
Support loading authentication credentials from Docker config file
Nov 8, 2016
96466db
Deploy to official and unofficial hubs
Nov 8, 2016
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
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
watchtower
36 changes: 36 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
## Prerequisites
To contribute code changes to this project you will need the following development kits.
* Go. [Download and install](https://golang.org/doc/install) the Go programming language
* [docker](https://docs.docker.com/engine/installation/)

## Checking out the code
When cloning watchtower to your development environment you should place your forked repo within the [standard go code structure](https://golang.org/doc/code.html#Organization).
```bash
cd $GOPATH/src
mkdir <yourfork>
cd <yourfork>
git clone [email protected]:<yourfork>/watchtower.git
cd watchtower
```

## Building and testing
watchtower is a go application and is built with go commands. The following commands assume that you are at the root level of your repo.
```bash
go get ./... # analyzes and retrieves package dependencies
go build # compiles and packages an executable binary, watchtower
go test # runs tests
./watchtower # runs the application (outside of a container)
```

### Building the docker image
watchtower is packaged and distributed as a docker image. A [golang-builder](https://github.com/CenturyLinkLabs/golang-builder) is used to package the go code and its
dependencies as a minimally-sized application. The application binary is then layered into to a minimal docker image (see `Dockerfile`), so that the entire image is <10MB.
See `circle.yml` for further details.The following commands assume that you are at the root level of your repo (i.e. `watchtower/`).

```bash
docker pull centurylink/golang-builder:latest # download the builder
docker run -v $(pwd):/src centurylink/golang-builder:latest # build the minimal binary
docker build -t <yourfork>/watchtower:latest . # build the docker image
docker run -v /var/run/docker.sock:/var/run/docker.sock <yourfork>/watchtower # run the application (inside of a container)
```

4 changes: 3 additions & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
FROM ubuntu:14.04
FROM centurylink/ca-certs
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A previous commit had set the base image to ubuntu:14:04 as a workaround for incorrectly packaged dependencies because ubuntu contains many of those dependencies (and much more besides). Proper use of golang-builder to package all of watchtower's dependencies into a single binary executable allows us to revert to a minimal base image.

MAINTAINER CenturyLink Labs <[email protected]>
LABEL "com.centurylinklabs.watchtower"="true"

COPY watchtower /
ENTRYPOINT ["/watchtower"]
42 changes: 0 additions & 42 deletions Godeps/Godeps.json

This file was deleted.

5 changes: 0 additions & 5 deletions Godeps/Readme

This file was deleted.

2 changes: 0 additions & 2 deletions Godeps/_workspace/.gitignore

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

Loading