1
0
Fork 0
mirror of https://github.com/moby/moby.git synced 2022-11-09 12:21:53 -05:00
Commit graph

10939 commits

Author SHA1 Message Date
Eric Paris
053c3557b3 Fix system socket/service unit files
Two problems how they are today:

In the current systemd unit files it is impossible to have the
docker.service started at system boot.  Instead enableing docker.service
will actually enable docker.socket.  This is a problem, as that means
any container with --restart=always will not launch on reboot.  And of
course as soon as you log in and type docker ps, docker.service will be
launched and now your images are running.  Talk about a PITA to debug!
The fix is to just install docker.service when people ask docker.service
to be enabled.  If an admin wants to enable docker.socket instead, that
is fine and will work just as it does today.

The second problem is a common docker devel workflow, although not
something normal admins would hit.  In this case consider a dev doing
the following:

systemctl stop docker.service

docker -d
[run commands]
[^C]

systemctl start docker.service

Running docker -d (without -F fd://) will clean up the
/var/run/docker.sock when it exits.  Remember, you just ran the docker
daemon not telling it about socket actviation, so cleaning up its socket
makes sense!  The new docker, started by systemd will expect socket
activation, but the last one cleaned up the docker.sock.  So things are
just broken.  You can, today, work around this by restarting
docker.socket.  This fixes it by telling docker.socket that it is
PartOf=docker.service.  So when docker.service is
started/stopped/restarted docker.socket will also be
started/stopped/restarted.  So the above semi-common devel workflow will
be fine.  When docker.service is stopped, so is docker.socket,   docker
-d (without -F fd://) will create and delete /var/run/docker.sock.
Starting docker.service again will restart docker.socket, which will
create the file an all is happy in the word.

Signed-off-by: Eric Paris <eparis@redhat.com>
2014-10-07 14:09:08 -04:00
Sven Dowideit
7813f85e7d Merge pull request from jamtur01/cli
Multiple fixes to the cli.md document.
2014-10-07 15:07:57 +10:00
Sven Dowideit
8f58025b70 Merge pull request from davide-ceretti/chore/prettify-docs-update.py
Prettify docs-update.py
2014-10-07 14:30:24 +10:00
Sven Dowideit
40cad37f0a Merge pull request from unclejack/add_workdir_test
add test for workdir env vars and add docs
2014-10-07 14:27:32 +10:00
James Turnbull
92a9b87a57 Merge pull request from proppy/patch-12
google: fix typo
2014-10-06 23:18:54 -04:00
Johan Euphrosine
0a056a31fa google: fix typo
Docker-DCO-1.1-Signed-off-by: Johan Euphrosine <proppy@google.com> (github: proppy)
2014-10-06 15:28:50 -07:00
Alexandr Morozov
a650ab7f29 Merge pull request from unclejack/integcli_lint
integcli: lint fixes
2014-10-06 14:32:08 -07:00
unclejack
c0e632246d integcli: lint fixes
Docker-DCO-1.1-Signed-off-by: Cristian Staretu <cristian.staretu@gmail.com> (github: unclejack)
2014-10-06 23:15:17 +03:00
Victor Vieux
6157af8292 Merge pull request from LK4D4/fix_build_cache_test
Fix TestBuildCacheADD to check cache in out, not in id
2014-10-06 11:56:18 -07:00
Michael Crosby
128c52f583 Merge pull request from cpuguy83/8398_fix_automatic_data_copy_for_volumesfrom
volumes copying data unexpectedly
2014-10-06 11:43:41 -07:00
Victor Vieux
40070609da Merge pull request from vieux/add_test_rm
add test and move one from rm to rmi
2014-10-06 11:30:12 -07:00
Brian Goff
e95b6fb648 Fix - volumes copying data unexpectedly
Prior to the volumes re-factor, data was not being copied on
volumes-from or host-mounted volumes.
After the re-factor, data was being copied for volumes-from.
This reverts this unintentional change in behavior.

Signed-off-by: Brian Goff <cpuguy83@gmail.com>
2014-10-06 14:21:46 -04:00
Victor Vieux
3e473c08b4 update test
Signed-off-by: Victor Vieux <vieux@docker.com>
2014-10-06 18:18:25 +00:00
Victor Vieux
7bd482d570 Merge pull request from duglin/ParserIndent
Fix builder/parser so it keeps some whitespace on split lines.
2014-10-06 10:32:02 -07:00
Michael Crosby
a761698700 Merge pull request from crosbymichael/disable-v2-registry
Remove registry v2 code path
2014-10-06 10:12:20 -07:00
Fred Lifton
3fc04f36e5 Merge pull request from duglin/Issue5278
Make fixed font sizes smaller per Issue 
2014-10-06 10:11:01 -07:00
Alexandr Morozov
21dff8cbec Fix TestBuildCacheADD to check cache in out, not in id
Signed-off-by: Alexandr Morozov <lk4d4@docker.com>
2014-10-06 10:04:10 -07:00
Victor Vieux
887d9238f5 Merge pull request from tonistiigi/8407-fix-host-header
Fix Host header on stream commands
2014-10-06 09:48:12 -07:00
Victor Vieux
166c56cabd Merge pull request from tonistiigi/build-content-type
Fix streaming JSON Content-type for postBuild
2014-10-06 09:38:52 -07:00
Tonis Tiigi
30d6ff99fc Fix streaming JSON Content-type for postBuild
See 

lineDelim is used by streamJSON() so it needs to be set
before its called.

Signed-off-by: Tõnis Tiigi <tonistiigi@gmail.com> (github: tonistiigi)
2014-10-06 19:20:10 +03:00
Tonis Tiigi
e457b21db3 Fix Host header on stream commands
Fixes 

Setting Host on URL only works if the Request does not
already have its Host property set.

Note that the API version was also swallowed.

Signed-off-by: Tõnis Tiigi <tonistiigi@gmail.com> (github: tonistiigi)
2014-10-06 17:04:27 +03:00
Doug Davis
9c201c5836 Make fixed font sizes smaller per Issue
Closes 

Signed-off-by: Doug Davis <dug@us.ibm.com>
2014-10-06 06:49:33 -07:00
Doug Davis
f440c6b224 Fix builder/parser so it keeps some whitespace on split lines.
If previous line ends with whitespace, or next line starts with whitepsace
we need to preserve a space otherwise things line:
RUN echo\
   hello
will appear as: RUN echohello

Noticed this while looking at  because he had lines ending in &&\

Signed-off-by: Doug Davis <dug@us.ibm.com>
2014-10-03 20:33:12 -07:00
James Turnbull
44264f48e4 Merge pull request from merty/patch-1
Fixed a typo in "Installing Docker on Mac OS X"
2014-10-03 22:03:50 -04:00
James Turnbull
62391d68a4 Merge pull request from duglin/Issue5509
Add note to docs about lack of shell processing in JSON form - Issue 5509
2014-10-03 22:03:31 -04:00
James Turnbull
95e169a6a1 Merge pull request from fredlf/adding_official-repo-guidelines
Edits and fixes based on review.
2014-10-03 22:03:05 -04:00
Andrea Luzzardi
84d9fd37b0 Merge pull request from jfrazelle/pr_8389
Invalid mount mode for volumes in
2014-10-03 17:22:21 -07:00
Jessica Frazelle
b10b458b6e Add test for invalid mount mode for volumes in.
Closes .

Docker-DCO-1.1-Signed-off-by: Jessica Frazelle <jess@docker.com> (github: jfrazelle)
2014-10-03 16:17:51 -07:00
Michael Crosby
1c62e0ae4e Remove registry v2 code path
As this feature requires more testing it is much safter to get the
underlying changes into the codebase first then enable the feature in
another release after proper testing and verification can be done.

Signed-off-by: Michael Crosby <crosbymichael@gmail.com>
2014-10-03 22:24:14 +00:00
Victor Vieux
d152a93b5f Merge pull request from aluzzardi/f-stable-ip
Stable Networking: Keep the same network settings during the entire container lifecycle.
2014-10-03 14:19:46 -07:00
Brian Goff
007b4f6340 Fixes bad validMountMode check
Needed to check if the mode was invalid and return error, not valid and
return error.

This didn't get picked up because the existing integration-cli tests
were all either expecting errors when a valid mode was passed in (e.g.
"ro" passed in, we expected an error because it was testing write).  So
modified a test which was testing for "rw" to actually pass in "rw"
instead of assuming the "rw"

Docker-DCO-1.1-Signed-off-by: Brian Goff <bgoff@cpuguy83-mbp.home> (github: cpuguy83)
2014-10-03 16:55:39 -04:00
Andrea Luzzardi
b669025949 Stable MAC addresses: Add support for MAC address restoring.
Signed-off-by: Andrea Luzzardi <aluzzardi@gmail.com>
2014-10-03 13:46:24 -07:00
Andrea Luzzardi
f1087c5fcf Daemon: Restore network settings at startup.
Signed-off-by: Andrea Luzzardi <aluzzardi@gmail.com>
2014-10-03 13:46:24 -07:00
Andrea Luzzardi
a487593729 Stable Networking: Keep the same network settings across container restarts.
This change will allocate network settings (IP and public ports) at
container creation rather than start and keep them throughout the
lifetime of the container (i.e. until it gets destroyed) instead of
discarding them when the container is stopped.

Signed-off-by: Andrea Luzzardi <aluzzardi@gmail.com>
2014-10-03 13:46:24 -07:00
Andrea Luzzardi
deffc572ce Container: Add restore network functionality.
RestoreNetwork() allows the container to restore its NetworkSettings (IP
and public ports).

Signed-off-by: Andrea Luzzardi <aluzzardi@gmail.com>
2014-10-03 13:46:24 -07:00
Andrea Luzzardi
ab4188c08d Container: Make allocateNetwork and releaseNetwork public.
Since we are moving network allocation outside of container scope (it
will be managed by create/destroy), those functions need to be
accessible from the outside.

Signed-off-by: Andrea Luzzardi <aluzzardi@gmail.com>
2014-10-03 13:46:24 -07:00
Andrea Luzzardi
103a4e0676 Network Allocation: Proper rollback in case of failure allocation.
Signed-off-by: Andrea Luzzardi <aluzzardi@gmail.com>
2014-10-03 13:46:24 -07:00
James Turnbull
ee101c3b2c Multiple fixes to the cli.md document.
*. Fixed headings so the side menu will now be consistent. Some sections
had H3s that were displaying and others did not leaving the left menu
very mismatched.

* Fixed several spelling errors.

* Re-formatted several long lines and badly laid out paragraphs.

* Fixed several double backticks.

* Added backticks to several outputs and variables.

* Removed two issues that are no longer valid.

* Removed several double spaces and extra lines.

Docker-DCO-1.1-Signed-off-by: James Turnbull <james@lovedthanlost.net> (github: jamtur01)
2014-10-03 16:28:43 -04:00
Alexandr Morozov
beff5067c8 Merge pull request from aluzzardi/f-consistent-mac
Support for consistent MAC address.
2014-10-03 13:28:03 -07:00
Andrea Luzzardi
88e21c6a75 Support for consistent MAC address.
Right now, MAC addresses are randomly generated by the kernel when
creating the veth interfaces.

This causes different issues related to ARP, such as ,  and .

This change adds support for consistent MAC addresses, guaranteeing that
an IP address will always end up with the same MAC address, no matter
what.

Since IP addresses are already guaranteed to be unique by the
IPAllocator, MAC addresses will inherit this property as well for free.

Consistent mac addresses is also a requirement for stable networking ()
since re-using the same IP address on a different MAC address triggers the ARP
issue.

Finally, this change makes the MAC address accessible through docker
inspect, which fixes .

Signed-off-by: Andrea Luzzardi <aluzzardi@gmail.com>
2014-10-03 13:22:38 -07:00
Mert Yazıcıoğlu
81cddaaa7d Fixed a typo in "Installing Docker on Mac OS X"
evironment -> environment
2014-10-03 23:18:40 +03:00
Michael Crosby
94da44cacf Merge pull request from fgrehm/patch-2
docs: Update `docker exec` examples
2014-10-03 11:30:37 -07:00
Michael Crosby
5a627e41ff Merge pull request from cpuguy83/6231_fix_chunked_encoding
Fix  - Accept chunked encoding on start
2014-10-03 11:27:57 -07:00
Brian Goff
86bfb9bca6 Fix - Accept chunked encoding on start
Docker-DCO-1.1-Signed-off-by: Brian Goff <cpuguy83@gmail.com> (github: cpuguy83)
2014-10-03 14:18:25 -04:00
Michael Crosby
23dc2ca2d5 Merge pull request from kwk/improve_docs_with_note_about_registry_frontend_web_app
Improve docs with note about registry frontend web app
2014-10-03 11:00:32 -07:00
Michael Crosby
eaaf9e3125 Merge pull request from dmcgowan/provenance_pull
Official image provenance pull flow
2014-10-03 10:56:54 -07:00
Michael Crosby
6deeb103cf Merge pull request from cpuguy83/change_volume_containers_to_private
Make volume.Containers private
2014-10-03 10:44:21 -07:00
Doug Davis
98ceae1a84 Add note to docs about lack of shell processing in JSON form
Closes 

Signed-off-by: Doug Davis <dug@us.ibm.com>
2014-10-03 05:18:25 -07:00
Fabio Rehm
6480b30a99 docs: Update docker exec examples
Signed-off-by: Fabio Rehm <fgrehm@gmail.com>
2014-10-03 01:13:59 -03:00
Brian Goff
c5e728c953 Make volume.Containers private
Also wrap access in mutex.
Makes sure we don't have any pontential for races in accessing this.
It also doesn't really need to be/shouldn't be in the config.json anyway

Docker-DCO-1.1-Signed-off-by: Brian Goff <bgoff@cpuguy83-mbp.home> (github: cpuguy83)
2014-10-02 20:46:17 -04:00