Commit graph

189 commits

Author SHA1 Message Date
Michael Crosby
5ae8c7a985 Copy VolumesRW values when using --volumes-from
Fixes #1201
2013-07-14 18:23:20 -09:00
Victor Vieux
a909223ee2 Merge pull request #1102 from dotcloud/1098-store_hostconfig_tmp
* Runtime: bind mounts are now preserved upon container restart
2013-07-12 05:04:10 -07:00
Victor Vieux
d918c7d9de export portmapping in network.go 2013-07-10 14:09:35 +00:00
Louis Opter
fac0d87d00 Add support for UDP (closes #33)
API Changes
-----------

The port notation is extended to support "/udp" or "/tcp" at the *end*
of the specifier string (and defaults to tcp if "/tcp" or "/udp" are
missing)

`docker ps` now shows UDP ports as "frontend->backend/udp". Nothing
changes for TCP ports.

`docker inspect` now displays two sub-dictionaries: "Tcp" and "Udp",
under "PortMapping" in "NetworkSettings".

Theses changes stand true for the values returned by the HTTP API too.

This changeset will definitely break tools built upon the API (or upon
`docker inspect`). A less intrusive way to add UDP ports in `docker
inspect` would be to simply add "/udp" for UDP ports but it will still
break existing applications which tries to convert the whole field to an
integer. I believe that having two TCP/UDP sub-dictionaries is better
because it makes the whole thing more clear and more easy to parse right
away (i.e: you don't have to check the format of the string, split it
and convert the right part to an integer)

Code Changes
------------

Significant changes in network.go:

- A second PortAllocator is instantiated for the UDP range;
- PortMapper maintains separate mapping for TCP and UDP;
- The extPorts array in NetworkInterface is now an array of Nat objects
  (so we can know on which protocol a given port was mapped when
  NetworkInterface.Release() is called);
- TCP proxying on localhost has been moved away in network_proxy.go.

localhost proxy code rewrite in network_proxy.go:

We have to proxy the traffic between localhost:frontend-port and
container:backend-port because Netfilter doesn't work properly on the
loopback interface and DNAT iptable rules aren't applied there.

- Goroutines in the TCP proxying code are now explicitly stopped when
  the proxy is stopped;
- UDP connection tracking using a map (more infos in [1]);
- Support for IPv6 (to be more accurate, the code is transparent to the
  Go net package, so you can use, tcp/tcp4/tcp6/udp/udp4/udp6);
- Single Proxy interface for both UDP and TCP proxying;
- Full test suite.

[1] https://github.com/dotcloud/docker/issues/33#issuecomment-20010400
2013-07-09 17:42:35 -07:00
Victor Vieux
bf7d6cbb4a rebase master 2013-07-08 13:26:29 +00:00
Caleb Spare
19121c16d9 Implement several golint suggestions, including:
* Removing type declarations where they're inferred
* Changing Url -> URL, Id -> ID in names
* Fixing snake-case names
2013-07-03 14:36:04 -07:00
Caleb Spare
1cf9c80e97 Mutex style change.
For structs protected by a single mutex, embed the mutex for more
concise usage.

Also use a sync.Mutex directly, rather than a pointer, to avoid the
need for initialization (because a Mutex's zero-value is valid and
ready to be used).
2013-07-02 15:53:08 -07:00
Victor Vieux
3042f11666 never remove the file and try to load it in start 2013-07-02 18:02:16 +00:00
Victor Vieux
27a137ccab change file location 2013-07-02 17:02:42 +00:00
Victor Vieux
06b53e3fc7 store hostConfig to /tmp while container is running 2013-07-02 12:19:25 +00:00
Michael Crosby
b16ff9f859 Add Entrypoint to builder and container config
By setting an entrypoint in the Dockerfile this
allows one to run an image and only pass arguments.
2013-07-01 05:34:27 -09:00
Gabriel Monroy
67239957c9 - Fix a few bugs in external mount-bind integration 2013-06-26 15:10:38 -07:00
Solomon Hykes
d4e62101ab * Runtime: better integration of external bind-mounts (run -b) into the volume subsystem (run -v) 2013-06-26 15:08:07 -07:00
Gabriel Monroy
4fdf11b2e6 + Runtime: mount volumes from a host directory with 'docker run -b' 2013-06-26 15:07:31 -07:00
Victor Vieux
63e8a4ac74 Merge pull request #970 from titanous/go1.1-unreachable
Remove code unreachable using Go 1.1
2013-06-21 10:44:40 -07:00
unclejack
66910a7602 mark command as optional for docker run 2013-06-21 11:06:41 +03:00
Jonathan Rudenberg
50b70eeb68 Remove code unreachable using Go 1.1 2013-06-20 23:19:44 -04:00
Victor Vieux
ddf5a1940f Merge branch 'master' into 22-add_sizes_images_and_containers-feature 2013-06-14 10:05:06 +00:00
Victor Vieux
697282d6ad Merge pull request #804 from dotcloud/no_stdout_stale-fix
*Runtime: Fix stale command when stdout is not allocated
2013-06-13 04:22:29 -07:00
Guillaume J. Charmes
7169212683 Fix typo 2013-06-10 11:08:40 -07:00
Victor Vieux
bf63cb9045 bump to master again 2013-06-05 16:01:36 +00:00
Guillaume J. Charmes
63e80384ea Fix nil pointer on some situatuion 2013-06-04 14:35:32 -07:00
Guillaume J. Charmes
7ef9833dbb Put back panic for go1.0.3 compatibility 2013-06-04 14:26:40 -07:00
Victor Vieux
fd224ee590 linted names 2013-06-04 18:00:22 +00:00
Victor Vieux
86ada2fa5d drop/omit 2013-06-04 13:51:12 +00:00
Victor Vieux
b515a5a9ec go vet 2013-06-04 13:24:58 +00:00
Guillaume J. Charmes
0ca8844398 Fix stale command with stdout is not allocated 2013-06-03 17:39:29 -07:00
Victor Vieux
3afdd82e42 bump to master 2013-05-30 23:38:40 +00:00
Guillaume J. Charmes
88ef309a94 Finish resize implementation client and server 2013-05-24 14:44:16 -07:00
Guillaume J. Charmes
70d2123efd Add resize endpoint to api 2013-05-23 19:33:28 -07:00
Victor Vieux
6fce89e60b bump to master 2013-05-22 13:41:29 +00:00
Guillaume J. Charmes
2e69e1727b Create a subpackage for utils 2013-05-14 22:37:35 +00:00
Victor Vieux
a91b710961 add sizes in images and containers 2013-05-13 15:14:20 +02:00
Jérôme Petazzoni
6f3e868a7b Merge branch 'master' of github.com:dotcloud/docker into 471-cpu-limit 2013-05-10 14:44:50 -07:00
Jérôme Petazzoni
e36752e033 if -c is not specified, do not set cpu.shares (instead of using the default value of 1024) 2013-05-07 11:43:45 -07:00
Jérôme Petazzoni
efd9becb78 implement "-c" option to allocate a number of CPU shares to a container 2013-05-07 11:16:30 -07:00
Victor Vieux
10c0e99037 update to master 2013-05-07 19:23:50 +02:00
Guillaume J. Charmes
9db4972a70 Make sure the destination directory exists when using docker insert 2013-05-06 16:00:30 -07:00
Guillaume J. Charmes
9751483112 Add insert command in order to insert external files within an image 2013-05-06 16:00:30 -07:00
Victor Vieux
6f9b574f25 bump to 0.2.2 2013-05-06 11:53:00 +02:00
Guillaume J. Charmes
da01dd3d56 Merge remote-tracking branch 'origin/registry-update'
+ Registry: Add the new registry support
2013-05-05 07:13:25 -07:00
shin-
be75608906 Fixed checksum computing. Ensure checksum is computed when image metadata is loaded from disk. Fixed docker push workflow. Moved hash computing to utils 2013-05-06 10:56:10 -07:00
shin-
ea3374bcb0 Prepend hash method to the image checksum 2013-05-06 10:54:55 -07:00
shin-
630d358384 Fixed checksum representation 2013-05-06 10:54:50 -07:00
shin-
048fd671ef Implemented checksum computation on image creation (necessary for new push primitive) 2013-05-06 10:52:42 -07:00
Victor Vieux
4f0bda2dd5 up to date with master 2013-05-02 18:36:23 +02:00
Guillaume J. Charmes
897cc573f0 Fix the graph.Create prototype 2013-05-02 09:23:29 -07:00
Guillaume J. Charmes
b0459adc27 Comply to the new graph.Create() prototype 2013-05-02 09:14:23 -07:00
Guillaume J. Charmes
3edd14b8c2 Implement the data volume removal 2013-05-02 09:14:23 -07:00
Guillaume J. Charmes
4099a31304 Implement the -volumes-from in order to mount volumes from an other container 2013-05-02 09:14:22 -07:00