-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Upgrade client to fix build, authentication, and image issues #26
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
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/
875efba
Reinstate MAINTAINER and LABEL, Ubuntu base image required by dockerc…
c4efc83
Improve error handling
02bca8d
Improve error reporting
25f1fee
Private registry authentication distinct from host
99ed959
Port client lib from samalba/dockerclient to docker/docker/client
ed035d6
go fmt
e011d3e
Discard obsolete samalba/dockerclient library and dependent tests
61ac18f
Ignore build output (watchtower binary)
b13e6af
Migrate from codegangsta lib to urfave
da9ba69
Updating dependencies with
97214b2
Consistent context
4771857
godep doesn't work, distro required
69db640
godeps doesn't work, go without
42fea79
Rework TLS support, remove unsupported options
8f13706
bdehamer/golang-builder doesn't work, use centurylink/golang-builder …
2386d18
Build instructions for contributors (because it's not obvious)
e8f6db2
Build instructions for contributors (because it's not obvious)
44dbd88
Merge branch 'auth' of github.com:rosscado/watchtower into auth
ef430b7
Add auth config, registry auth fails silently without
1c59200
Registry authentication was failing silently when pulling images.
5412642
Cannot load host Docker config from container. Remove option and rely…
e752364
When authentication credentials are supplied as env vars they are alw…
6a56597
Refactor port mapping functions for build simplicity
5a03b65
Automatically push rosscado/watchtower:auth branch to rosscado/watcht…
952e720
Change image name to push to rosscado/watchtower
rosscado 79320bb
Automatically deploy from hub branch to rosscado/watchtower docker hu…
dad5d58
Support loading authentication credentials from Docker config file
96466db
Deploy to official and unofficial hubs
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1 @@ | ||
| watchtower |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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) | ||
| ``` | ||
|
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,4 +1,6 @@ | ||
| FROM ubuntu:14.04 | ||
| FROM centurylink/ca-certs | ||
| MAINTAINER CenturyLink Labs <[email protected]> | ||
| LABEL "com.centurylinklabs.watchtower"="true" | ||
|
|
||
| COPY watchtower / | ||
| ENTRYPOINT ["/watchtower"] | ||
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
1 change: 0 additions & 1 deletion
1
Godeps/_workspace/src/github.com/Sirupsen/logrus/.gitignore
This file was deleted.
Oops, something went wrong.
8 changes: 0 additions & 8 deletions
8
Godeps/_workspace/src/github.com/Sirupsen/logrus/.travis.yml
This file was deleted.
Oops, something went wrong.
33 changes: 0 additions & 33 deletions
33
Godeps/_workspace/src/github.com/Sirupsen/logrus/CHANGELOG.md
This file was deleted.
Oops, something went wrong.
21 changes: 0 additions & 21 deletions
21
Godeps/_workspace/src/github.com/Sirupsen/logrus/LICENSE
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
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:04as a workaround for incorrectly packaged dependencies because ubuntu contains many of those dependencies (and much more besides). Proper use ofgolang-builderto package all of watchtower's dependencies into a single binary executable allows us to revert to a minimal base image.