an [abandoned] attempt to slice out the docker/docker/pkg package
Find a file
Josh Hawn bd8af5b419 Fix docker cp Behavior With Symlinks
[pkg/archive] Update archive/copy path handling

  - Remove unused TarOptions.Name field.
  - Add new TarOptions.RebaseNames field.
  - Update some of the logic around path dir/base splitting.
  - Update some of the logic behind archive entry name rebasing.

[api/types] Add LinkTarget field to PathStat

[daemon] Fix stat, archive, extract of symlinks

  These operations *should* resolve symlinks that are in the path but if the
  resource itself is a symlink then it *should not* be resolved. This patch
  puts this logic into a common function `resolvePath` which resolves symlinks
  of the path's dir in scope of the container rootfs but does not resolve the
  final element of the path. Now archive, extract, and stat operations will
  return symlinks if the path is indeed a symlink.

[api/client] Update cp path hanling

[docs/reference/api] Update description of stat

  Add the linkTarget field to the header of the archive endpoint.
  Remove path field.

[integration-cli] Fix/Add cp symlink test cases

  Copying a symlink should do just that: copy the symlink NOT
  copy the target of the symlink. Also, the resulting file from
  the copy should have the name of the symlink NOT the name of
  the target file.

  Copying to a symlink should copy to the symlink target and not
  modify the symlink itself.

Docker-DCO-1.1-Signed-off-by: Josh Hawn <josh.hawn@docker.com> (github: jlhawn)
2015-07-30 12:14:28 -07:00
ansiescape Use notary library for trusted image fetch and signing 2015-07-24 14:08:20 -07:00
archive Fix docker cp Behavior With Symlinks 2015-07-30 12:14:28 -07:00
broadcastwriter remove dead code after decoupling from jsonlog 2015-07-21 20:47:35 -04:00
chrootarchive Windows: Daemon build is broken 2015-07-29 20:08:51 -07:00
devicemapper devicemapper: Check loop devices of existing pool 2015-07-07 14:13:29 -04:00
directory make docker compile on freebsd 2015-07-29 21:25:56 +03:00
fileutils Add missing tests and docs for pkg/fileutils 2015-07-12 22:43:42 +02:00
graphdb Windows: Statically linkable SQLite3 2015-07-21 09:33:46 -07:00
homedir Update libcontainer 2015-07-16 16:02:26 -07:00
httputils Fixed outdated comment. 2015-07-02 08:17:11 -03:00
ioutils Fix reset timeout for buffer readers. 2015-07-28 14:30:18 -07:00
jsonlog remove dead code after decoupling from jsonlog 2015-07-21 20:47:35 -04:00
jsonmessage Add test coverage to pkg/jsonmessage 2015-06-02 21:19:38 +02:00
listenbuffer linting changes 2015-06-17 01:16:57 +03:00
mflag Fix golint for pkg/mflag 2015-07-28 15:32:42 +02:00
mount pkg: mount: golint 2015-07-22 10:26:10 +02:00
namesgenerator Use global random *rand.Rand instance in pkg 2015-07-29 09:30:48 -07:00
nat Fix go vet errors 2015-07-25 17:00:10 -04:00
parsers make docker compile on freebsd 2015-07-29 21:25:56 +03:00
pidfile Lint on pkg/* packages 2015-07-27 21:26:21 +02:00
plugins Lint on pkg/* packages 2015-07-27 21:26:21 +02:00
pools Lint on pkg/* packages 2015-07-27 21:26:21 +02:00
progressreader Lint on pkg/* packages 2015-07-27 21:26:21 +02:00
promise Move Go() promise-like func from utils to pkg/promise 2014-09-29 23:16:27 -07:00
proxy Lint on pkg/* packages 2015-07-27 21:26:21 +02:00
pubsub Don't use time.After if there is no timeout 2015-07-14 09:14:51 -07:00
random Add global instance of *(math/rand).Rand and Reader 2015-07-28 22:30:57 -07:00
reexec make docker compile on freebsd 2015-07-29 21:25:56 +03:00
signal Lint on pkg/* packages 2015-07-27 21:26:21 +02:00
sockets make docker compile on freebsd 2015-07-29 21:25:56 +03:00
stdcopy Fix Typo in stdcopy.go 2015-06-24 15:00:14 +08:00
streamformatter Lint on pkg/* packages 2015-07-27 21:26:21 +02:00
stringid Add GenerateNonCryptoID function to avoid entropy exhaustion 2015-07-28 22:31:01 -07:00
stringutils Use global random *rand.Rand instance in pkg 2015-07-29 09:30:48 -07:00
symlink Remove subdirectories MAINTAINERS files 2015-03-06 18:21:51 -08:00
sysinfo make docker compile on freebsd 2015-07-29 21:25:56 +03:00
system make docker compile on freebsd 2015-07-29 21:25:56 +03:00
systemd Lint on pkg/* packages 2015-07-27 21:26:21 +02:00
tailfile Lint on pkg/* packages 2015-07-27 21:26:21 +02:00
tarsum Lint on pkg/* packages 2015-07-27 21:26:21 +02:00
term Fix golint nit in term_windows.go 2015-07-27 17:40:49 -07:00
timeoutconn Lint on pkg/* packages 2015-07-27 21:26:21 +02:00
timeutils Lint on pkg/* packages 2015-07-27 21:26:21 +02:00
tlsconfig tlsconfig: better format for error message in tlsconfig 2015-07-30 14:15:41 -04:00
truncindex Merge pull request #15156 from duglin/AddErrTruncIndex 2015-07-30 14:55:40 -04:00
ulimit Lint on pkg/* packages 2015-07-27 21:26:21 +02:00
units Lint on pkg/* packages 2015-07-27 21:26:21 +02:00
urlutil Lint on pkg/* packages 2015-07-27 21:26:21 +02:00
useragent Lint on pkg/* packages 2015-07-27 21:26:21 +02:00
version Fix minor typo 2015-03-25 00:46:22 +08:00
README.md Add README to pkg 2013-12-23 23:12:19 +00:00

pkg/ is a collection of utility packages used by the Docker project without being specific to its internals.

Utility packages are kept separate from the docker core codebase to keep it as small and concise as possible. If some utilities grow larger and their APIs stabilize, they may be moved to their own repository under the Docker organization, to facilitate re-use by other projects. However that is not the priority.

The directory pkg is named after the same directory in the camlistore project. Since Brad is a core Go maintainer, we thought it made sense to copy his methods for organizing Go code :) Thanks Brad!

Because utility packages are small and neatly separated from the rest of the codebase, they are a good place to start for aspiring maintainers and contributors. Get in touch if you want to help maintain them!