MCPcopy Index your code
hub / github.com/dogestry/dogestry

github.com/dogestry/dogestry @v2.1.6

Chat with this repo
repository ↗ · DeepWiki ↗ · release v2.1.6 ↗ · + Follow
1,546 symbols 5,593 edges 135 files 570 documented · 37% updated 7y agov2.1.6 · 2016-02-23★ 41412 open issues
What it actually does AI analysis from the code graph — generated when you open this
loading…
README

Dogestry

Simple CLI app + server for storing and retrieving Docker image(s) from Amazon S3.

Prerequisites

  • AWS account with at least one S3 bucket
  • Go 1.4 or higher (development only)
  • github.com/tools/godep (development only)
  • Docker 1.4 or higher

Installation

If you just want to run Dogestry, get the binary release that works for your platform. It's a statically linked binary: there are no dependencies. Download and run it!

If you prefer to build it yourself, clone the repo and godep get && godep go build

Usage

Setup

Typical S3 Usage:

$ export AWS_ACCESS_KEY=ABC
$ export AWS_SECRET_KEY=DEF
$ export DOCKER_HOST=tcp://localhost:2375
$ dogestry push s3://<bucket name>?region=us-east-1 <image name>
$ dogestry pull s3://<bucket name>?region=us-east-1 <image name>

Push

Push the hipache image to the S3 bucket ops-goodies located in us-west-2:

dogestry push s3://ops-goodies/ hipache

Push the hipache image to the S3 bucket ops-goodies located in us-west-2 with tag latest:

dogestry push s3://ops-goodies/ hipache:latest

Pull

Pull the hipache image and tag from S3 bucket ops-goodies:

dogestry pull s3://ops-goodies/ hipache

Pull the hipache image and tag from S3 bucket ops-goodies with tag latest:

dogestry pull s3://ops-goodies/ hipache:latest

If you want to pull an image from S3 to multiple hosts, you can use the -pullhosts option. The value for the -pullhosts option is a comma-separated list of hosts, in the following format: tcp://[host][:port] or unix://path.

The s3 version, with pullhosts:

dogestry -pullhosts tcp://host-1:2375,tcp://host-2:2375,tcp://host-3:2375 s3://ops-goodies/docker-repo/ hipache

List

List the images in the S3 bucket ops-goodies:

$ dogestry list s3://ops-goodies/
REPOSITORY                                                    TAG
hipache                                                       0.3.1
hipache                                                       latest
hipache                                                       0.2.8
hipache                                                       0.2.4

Server Mode (Accelerator)

Dogestry can also be run in server mode with the -server parameter; doing so can dramatically speed up image pulls when using -pullhosts. It also directly supports pulls from the docker client itself.

To make use of server mode:

  1. Deploy and run Dogestry with the -server param on all Docker servers that are the destinations of the '-pullhosts' parameter. This can be done directly, or inside a container with access to the docker.sock.
  2. Ensure your firewall on the host(s) is configured to allow incoming requests on port 22375 (this is what dogestry server listens on by default). Map this port if running it in a container.
  3. Perform your pull (with -pullhosts) as usual: $ dogestry -pullhosts tcp://host-1:2375,tcp://host-2:2375,tcp://host-3:2375 s3://ops-goodies/docker-repo/ hipache

Dogestry (client) will automatically detect that the remote host is running Dogestry server and issue the pull command directly to the host (instead of pulling the image down first and then uploading it to the host via Docker API).

In addition, you can also perform a pull against a server running Dogestry, avoiding the need for the dogestry binary:

# Update your .dockercfg to include your AWS credentials
$ dogestry login opsgoodies.com
Updating docker file /root/.dockercfg...
AWS_ACCESS_KEY: MyAwsAccessKey
AWS_SECRET_KEY: MyAWSSecretKey
S3_URL: s3://ops-goodies
# You can now pull via the Docker binary
$ docker -H tcp://host-1:22375 pull opsgoodies.com/docker-repo/hipache

S3 files layout

Dogestry will create two directories within your S3 bucket called "images" and "repositories". Example contents:

Images:

images/5d4e24b3d968cc6413a81f6f49566a0db80be401d647ade6d977a9dd9864569f/layer.tar
images/5d4e24b3d968cc6413a81f6f49566a0db80be401d647ade6d977a9dd9864569f/VERSION
images/5d4e24b3d968cc6413a81f6f49566a0db80be401d647ade6d977a9dd9864569f/json

Repositories:

repositories/myapp/20131210     (content: 5d4e24b3d968cc6413a81f6f49566a0db80be401d647ade6d977a9dd9864569f)
repositories/myapp/latest       (content: 5d4e24b3d968cc6413a81f6f49566a0db80be401d647ade6d977a9dd9864569f)

License

The MIT License (MIT)

Copyright (c) 2014 Blake eLearning

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

Extension points exported contracts — how you extend this code

Signer (Interface)
Designates a signer interface suitable for signing AWS requests, params should be appropriately encoded for the request [4 …
Godeps/_workspace/src/github.com/crowdmob/goamz/aws/aws.go
Remote (Interface)
(no doc) [1 implementers]
remote/remote.go
DogestryCliLike (Interface)
(no doc) [1 implementers]
utils/lockfile.go
RetryPolicy (Interface)
A RetryPolicy encapsulates a strategy for implementing client retries. Default implementations are provided which match [3 …
Godeps/_workspace/src/github.com/crowdmob/goamz/aws/retry.go
ImageWalkFn (FuncType)
(no doc)
remote/remote.go
ConfigReadWriter (Interface)
ConfigReadWriter interface [2 implementers]
Godeps/_workspace/src/github.com/gigablah/dockerconfig/config.go
AWSService (Interface)
An AWS Service interface with the API to query the AWS service Supplied as an easy way to mock out service calls during [1 …
Godeps/_workspace/src/github.com/crowdmob/goamz/aws/aws.go
Callback (FuncType)
Callback for custom output For example: bar.Callback = func(s string) { mySuperPrint(s) }
Godeps/_workspace/src/github.com/cheggaaa/pb/pb.go

Core symbols most depended-on inside this repo

Error
called by 132
Godeps/_workspace/src/github.com/fsouza/go-dockerclient/client.go
String
called by 115
Godeps/_workspace/src/github.com/fsouza/go-dockerclient/change.go
Path
called by 91
Godeps/_workspace/src/github.com/gorilla/mux/mux.go
ServeHTTP
called by 73
Godeps/_workspace/src/github.com/fsouza/go-dockerclient/testing/server.go
buildMuxer
called by 67
Godeps/_workspace/src/github.com/fsouza/go-dockerclient/testing/server.go
HandlerFunc
called by 63
Godeps/_workspace/src/github.com/gorilla/mux/route.go
Close
called by 62
Godeps/_workspace/src/github.com/rlmcpherson/s3gof3r/putter.go
Add
called by 52
Godeps/_workspace/src/github.com/cheggaaa/pb/pb.go

Shape

Method 661
Function 601
Struct 238
TypeAlias 26
Interface 12
FuncType 8

Languages

Go100%

Modules by API surface

Godeps/_workspace/src/github.com/fsouza/go-dockerclient/testing/server_test.go82 symbols
Godeps/_workspace/src/github.com/fsouza/go-dockerclient/container_test.go72 symbols
Godeps/_workspace/src/github.com/crowdmob/goamz/s3/s3.go68 symbols
Godeps/_workspace/src/github.com/fsouza/go-dockerclient/container.go64 symbols
Godeps/_workspace/src/github.com/fsouza/go-dockerclient/testing/server.go51 symbols
Godeps/_workspace/src/github.com/crowdmob/goamz/s3/s3test/server.go49 symbols
Godeps/_workspace/src/github.com/gorilla/mux/route.go46 symbols
Godeps/_workspace/src/github.com/fsouza/go-dockerclient/image_test.go43 symbols
Godeps/_workspace/src/github.com/crowdmob/goamz/aws/aws.go42 symbols
Godeps/_workspace/src/github.com/gorilla/mux/mux.go39 symbols
remote/s3.go37 symbols
Godeps/_workspace/src/github.com/fsouza/go-dockerclient/image.go32 symbols

For agents

$ claude mcp add dogestry \
  -- python -m otcore.mcp_server <graph>

⬇ download graph artifact