Commit graph

993 commits

Author SHA1 Message Date
Tianon Gravi
ed92fa5a28 Rename BINDDIR to BIND_DIR
It turns out the back-to-back `D`s here were tripping people up because visually, it looks like a typo.  This renames the variable to `BIND_DIR`, but allows `BINDDIR` to continue working for backwards-compatibility.

Signed-off-by: Andrew "Tianon" Page <admwiggin@gmail.com>
2015-02-13 15:50:42 -07:00
Michael Crosby
35464d7db3 Merge pull request #10424 from LK4D4/fix_non_tailed_log_format
Fix logs, so now, old and followed logs has same format without []
2015-02-06 14:35:45 -08:00
Michael Crosby
7637041156 Merge pull request #9705 from acbodine/9311-truncindex-error-duplicate-id-on-ambiguous-id
Closes #9311 Handles container id/name collisions against daemon functionalities according to #8069
2015-02-06 14:01:28 -08:00
Tibor Vass
6a360227e4 Merge pull request #10612 from vbatts/vbatts-archive_sort
pkg/archive: sort files
2015-02-06 16:50:53 -05:00
Ahmet Alp Balkan
2c44d13150 Export $HOME lookup to pkg/homedir
Signed-off-by: Ahmet Alp Balkan <ahmetb@microsoft.com>
2015-02-06 11:42:45 -08:00
Vincent Batts
ecf82746a8 pkg/archive: test that confirms hardlink ordering
This test was written against
master(abdfb21e3a761efdd70614de42905ff7911c5372) as a failing test, but
works with this patch set.

Signed-off-by: Vincent Batts <vbatts@redhat.com>
2015-02-06 18:14:38 +01:00
Vincent Batts
c059e6d158 pkg/archive: sort files
sort changes found and exported.

Sorting the files before appending them to the tar archive
would mean a dependable ordering for types like hardlinks.

Also, combine sort logic used

Signed-off-by: Vincent Batts <vbatts@redhat.com>
2015-02-06 18:13:57 +01:00
Jessie Frazelle
193aa34569 Merge pull request #10547 from duglin/Issue10214
Pretty the help text
2015-02-04 11:31:18 -08:00
Doug Davis
9bc2b3482b Pretty the help text
This modifies the "docker help" text so that it is no wider than 80 chars
and each description fits on one line. This will also try to use ~ when
possible

Added a test to make sure we don't go over 80 chars again.
Added a test to make sure we use ~

Applied rules/tests to all docker commands - not just main help text

Closes #10214

Signed-off-by: Doug Davis <dug@us.ibm.com>
2015-02-04 07:59:16 -08:00
Chen Hanxiao
b7f328a24b fix comments typos
s/propogated/propagated

Signed-off-by: Chen Hanxiao <chenhanxiao@cn.fujitsu.com>
2015-02-04 10:47:37 +08:00
Alexander Morozov
905242e00a Fix logs, so now, old and followed logs has same format without []
Signed-off-by: Alexander Morozov <lk4d4@docker.com>
2015-01-28 17:57:10 -08:00
Michael Crosby
810a000d6b Merge pull request #10197 from vbatts/vbatts-dm_cookie_support
devicemapper: API for cookie support
2015-01-27 11:44:03 -08:00
Arnaud Porterie
95fe485137 Merge pull request #10305 from jlhawn/use_tarsum_v1
Always store images with tarsum.v1 checksum added
2015-01-26 14:42:07 -08:00
unclejack
4c55c3aa45 pkg/archive: remove tar autodetection log line
Signed-off-by: Cristian Staretu <cristian.staretu@gmail.com>
2015-01-24 08:43:03 +02:00
Josh Hawn
d01b451dd5 Always store images with tarsum.v1 checksum added
Updates `image.StoreImage()` to always ensure that images
that are installed in Docker have a tarsum.v1 checksum.

Docker-DCO-1.1-Signed-off-by: Josh Hawn <josh.hawn@docker.com> (github: jlhawn)
2015-01-23 11:30:27 -08:00
Ian Babrou
eec1af54d1 Not doing extra assertion for io.Closer
Signed-off-by: Ian Babrou <ibobrik@gmail.com>
2015-01-22 10:36:20 +03:00
Andrew C. Bodine
2da8e34079 Closes #9311 Handles container id/name collisions against daemon functionalities according to #8069
Signed-off-by: Andrew C. Bodine <acbodine@us.ibm.com>
2015-01-21 17:11:31 -08:00
Jessie Frazelle
feb02197c1 Merge pull request #10231 from estesp/move-iptables-check
Move iptables check out of runtime init() to separate function
2015-01-21 10:46:40 -08:00
Michael Crosby
a96214b8c6 Remove publisher if no one is listening
Signed-off-by: Michael Crosby <crosbymichael@gmail.com>
2015-01-20 20:21:47 -08:00
Michael Crosby
eff8e3294c Add pubsub package to handle robust publisher
Signed-off-by: Michael Crosby <crosbymichael@gmail.com>
2015-01-20 20:21:46 -08:00
Phil Estes
3ffffc0cff Move iptables check out of runtime init() to separate function
Due to the iptables package being `init`ed at start of the docker
runtime, this means the iptables --wait command listing all rules
is run, no matter if the command is simply "docker -h".  It makes
more sense to both locate the iptables command and check for the
wait flag support at the time iptables is actually used, as it
may not be used at all if certain network support is off/configured
differently.

Docker-DCO-1.1-Signed-off-by: Phil Estes <estesp@linux.vnet.ibm.com> (github: estesp)
2015-01-20 21:04:22 -05:00
99232a99a9 Merge pull request #10222 from vbatts/vbatts-dm_flag_and_output
dm flag and output
2015-01-20 18:45:43 -05:00
bfb4954a1f Merge pull request #10193 from vbatts/vbatts-dm_logging
devmapper: initialize log levels
2015-01-20 14:06:01 -05:00
Vincent Batts
355cee5b33 devicemapper: define device-mapper log levels
Signed-off-by: Vincent Batts <vbatts@redhat.com>
2015-01-20 13:31:12 -05:00
Alexander Morozov
ce6a9f383b Merge pull request #10005 from estesp/fix-localhost-nameserver-cleanup
Clean up localhost resolv logic and add IPv6 support to regexp
2015-01-20 10:30:06 -08:00
Vincent Batts
650ca7d915 devicemapper: API for checking cookie support
Signed-off-by: Vincent Batts <vbatts@redhat.com>
2015-01-19 20:35:20 -05:00
Phil Estes
4b79ea2a3c Clean up localhost resolv logic and add IPv6 support to regexp
Addresses #5811

This cleans up an error in the logic which removes localhost resolvers
from the host resolv.conf at container creation start time. Specifically
when the determination is made if any nameservers are left after
removing localhost resolvers, it was using a string match on the word
"nameserver", which could have been anywhere (including commented out)
leading to incorrect situations where no nameservers were left but the
default ones were not added.

This also adds some complexity to the regular expressions for finding
nameservers in general, as well as matching on localhost resolvers due
to the recent addition of IPv6 support.  Because of IPv6 support now
available in the Docker daemon, the resolvconf code is now aware of
IPv6 enable/disable state and uses that for both filter/cleaning of
nameservers as well as adding default Google DNS (IPv4 only vs. IPv4
and IPv6 if IPv6 enabled).  For all these changes, tests have been
added/strengthened to test these additional capabilities.

Docker-DCO-1.1-Signed-off-by: Phil Estes <estesp@linux.vnet.ibm.com> (github: estesp)
2015-01-19 19:35:55 -05:00
Vincent Batts
ffc90a8fbf devicemapper: debug output specifics
moar information for the information gods

Signed-off-by: Vincent Batts <vbatts@redhat.com>
2015-01-19 17:21:10 -05:00
Vincent Batts
457a35ba47 devicemapper: define the fallback flag
DM_UDEV_DISABLE_LIBRARY_FALLBACK is disabled by most applications today
when using device-mapper, and ensuring that device-mapper is in sync
with udev. This flag instructs devicemapper to not fallback to creating
the device nodes itself. In the case of udev sync not being supported,
devicemapper will attempt to create the devices in a timely manner,
regardless of udev.

Signed-off-by: Vincent Batts <vbatts@redhat.com>
2015-01-19 17:06:53 -05:00
Vincent Batts
13fc8f758d devicemapper: dm_udev_get_sync_support
expose an api to call dm_udev_get_sync_support/dm_udev_set_sync_support

Signed-off-by: Vincent Batts <vbatts@redhat.com>
2015-01-19 15:15:51 -05:00
Josh Hawn
328a6bbf4e Add Tarsum Calculation during v2 Pull operation
While the v2 pull operation is writing the body of the layer blob to disk
it now computes the tarsum checksum of the archive before extracting it to
the backend storage driver. If the checksum does not match that from the
image manifest an error is raised.

Also adds more debug logging to the pull operation and fixes existing test
cases which were failing. Adds a reverse lookup constructor to the tarsum
package so that you can get a tarsum object using a checksum label.

Docker-DCO-1.1-Signed-off-by: Josh Hawn <josh.hawn@docker.com> (github: jlhawn)
2015-01-15 14:05:05 -08:00
Qiang Huang
a3bca489d0 correct the flag comments
Signed-off-by: Qiang Huang <h.huangqiang@huawei.com>
2015-01-13 15:40:24 +08:00
Jessie Frazelle
a802fb3df3 Merge pull request #10029 from soulshake/add-cecilia-payne-gaposchkin
Add Cecilia Payne-Gaposchkin to names generator.
2015-01-12 17:31:19 -08:00
AJ Bowen
ca70deba07 Add Cecilia Payne-Gaposchkin to the names generator.
Signed-off-by: AJ Bowen <aj@gandi.net>
2015-01-12 16:24:15 -08:00
Victor Vieux
e2b6c1fdac fix issue with goimport
Signed-off-by: Victor Vieux <vieux@docker.com>
2015-01-12 22:52:19 +00:00
Victor Vieux
288106b71b update copyrights to 2015
Signed-off-by: Victor Vieux <vieux@docker.com>
2015-01-12 22:47:36 +00:00
soulshake
6366ac1c34 Add Laura Poitras to the names generator.
http://www.wired.com/2014/10/laura-poitras-crypto-tools-made-snowden-film-possible/

Signed-off-by: AJ Bowen <aj@gandi.net>
2015-01-12 09:35:12 -08:00
Jessica Frazelle
eeb86dfc70 Add Aaron Swartz to the names generator.
https://en.wikiquote.org/wiki/Aaron_Swartz

Docker-DCO-1.1-Signed-off-by: Jessica Frazelle <jess@docker.com> (github: jfrazelle)
2015-01-09 22:25:53 -08:00
Alexander Morozov
ba9513ff3f Merge pull request #9648 from estesp/9202-update-resolvconf
Update container resolv.conf when host network changes /etc/resolv.conf
2015-01-08 14:06:55 -08:00
Phil Estes
8ae8751b21 Update container resolv.conf when host network changes /etc/resolv.conf
Only modifies non-running containers resolv.conf bind mount, and only if
the container has an unmodified resolv.conf compared to its contents at
container start time (so we don't overwrite manual/automated changes
within the container runtime). For containers which are running when
the host resolv.conf changes, the update will only be applied to the
container version of resolv.conf when the container is "bounced" down
and back up (e.g. stop/start or restart)

Docker-DCO-1.1-Signed-off-by: Phil Estes <estesp@linux.vnet.ibm.com> (github: estesp)
2015-01-08 14:15:13 -05:00
Michael Crosby
73e5a67591 Merge pull request #8748 from duglin/Issue8330
Have .dockerignore support Dockerfile/.dockerignore
2015-01-06 13:47:42 -08:00
Doug Davis
f8ec68ef67 Have .dockerignore support Dockerfile/.dockerignore
If .dockerignore mentions either then the client will send them to the
daemon but the daemon will erase them after the Dockerfile has been parsed
to simulate them never being sent in the first place.

an events test kept failing for me so I tried to fix that too

Closes #8330

Signed-off-by: Doug Davis <dug@us.ibm.com>
2015-01-06 10:57:48 -08:00
Jessie Frazelle
d5ab5f9788 Merge pull request #8941 from agonzalezro/log-duplicates
Log when truncindex.Get returns >1 container
2015-01-06 10:41:19 -08:00
Michal Minar
cfb25ffb10 Handle bad options better
* Do not log bad options error message twice, e.g.:

    $ docker run --pouet
    flag provided but not defined: --pouet
    See 'docker run --help'.
    2014/11/05 21:41:23 flag provided but not defined: --pouet

  With this patch just the first two lines will be produced.

* Print 'docker' just once when run without a command, e.g.:

    $ docker --hel
    flag provided but not defined: --hel
    See 'docker docker --help'.

Signed-off-by: Michal Minar <miminar@redhat.com>
2015-01-06 13:44:27 +01:00
Tibor Vass
f23192465b refactor redundant code around calls to cmd.Parse
Signed-off-by: Tibor Vass <teabee89@gmail.com>
2015-01-06 13:41:16 +01:00
Dan Walsh
d440ff0beb Remove TestUsage, since Usage will no longer be shown on failure to parse
Docker-DCO-1.1-Signed-off-by: Dan Walsh <dwalsh@redhat.com> (github: rhatdan)
2015-01-06 13:40:14 +01:00
Dan Walsh
6c3b7f1932 --help option and help command should print to stdout not stderr
--help and help are successful commands so output should not go to error.

    QE teams have requested this change, also users doing docker help | less
    or docker run --help | less would expect this to work.

    Usage statement should only be printed when the user asks for it.
    Errors should print error message and then suggest the docker COMMAND --help
    command to see usage information.

    The current behaviour causes the user to have to search for the error message
    and sometimes scrolls right off the screen.  For example a error on a
    "docker run" command is very difficult to diagnose.

    Finally erros should always exit with a non 0 exit code, if the user
    makes a CLI error.

Docker-DCO-1.1-Signed-off-by: Dan Walsh <dwalsh@redhat.com> (github: rhatdan)
2015-01-06 13:40:14 +01:00
Srini Brahmaroutu
c466b9baa5 add ability to publish range of ports
Closes #8899
Signed-off-by: Srini Brahmaroutu <srbrahma@us.ibm.com>
2015-01-02 23:21:26 +00:00
Tianon Gravi
d67d28eaec Add descriptions for bell, lumiere, morse, nobel, ptolemy, and wright
Signed-off-by: Andrew "Tianon" Page <admwiggin@gmail.com>
2014-12-26 16:53:40 -07:00
Tianon Gravi
dba8948308 Switch names-generator arrays to be long-form
This way, we can embed the link/description lines directly in the array itself, conflicts between PRs to this section are minimized, new PRs are easier to review, and it's a lot easier to notice when people are missing a link/description (like the few that currently are).

Signed-off-by: Andrew "Tianon" Page <admwiggin@gmail.com>
2014-12-26 16:44:47 -07:00