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
Guillaume J. Charmes
6fb495bf6f
Move the id of volumes to Container (instead of Container.Config)
2013-05-02 09:14:22 -07:00
Guillaume J. Charmes
faf8daa7c6
Switch back config to map[string]struct{}
2013-05-02 09:14:22 -07:00
Guillaume J. Charmes
8d9aaee60b
Handle data volumes mount points
2013-05-02 09:14:22 -07:00
Guillaume J. Charmes
35d704c8a0
Change the volumes type to map[string]string to store both source and destination
2013-05-02 09:14:22 -07:00
Solomon Hykes
1df5f4094b
docker run -v PATH: bind a new data volume to a container
2013-05-02 09:14:22 -07:00
Victor Vieux
cf19be44a8
added run (wip), fixed ps and images, added port and tag
2013-04-23 18:20:53 +02:00
Guillaume J. Charmes
f926ed182f
Allow to kill/stop ghosts
2013-04-22 17:53:32 -07:00
Guillaume J. Charmes
d440782e17
Allow to kill container after docker server restarts
2013-04-22 17:52:38 -07:00
Guillaume J. Charmes
82848d4158
Allow to wait on container even after docker server restarts using lxc-info
2013-04-22 17:52:38 -07:00
Evan Wies
ffe16e3224
Fix typo (ghot -> ghost)
2013-04-22 18:37:06 -04:00
Solomon Hykes
76b40ad6c9
Merge remote-tracking branch 'origin/check_kernel_capabilities'
2013-04-20 17:40:25 -07:00
Solomon Hykes
931ca464a7
'docker ps' shows port mappings
2013-04-19 19:29:13 -07:00
Guillaume J. Charmes
e92c4b1f39
Merge pull request #415 from dotcloud/261-choose_grace_period-feature
...
added -t in docker stop and restart to choose grace period
2013-04-19 12:42:34 -07:00
Victor Vieux
b295239de2
added: info, history, logs, ps, start, stop, restart, rm, rmi
2013-04-19 15:24:37 +02:00
Guillaume J. Charmes
f68d107a13
Remove the NO_MEMORY_LIMIT constant
2013-04-18 21:08:20 -07:00
Guillaume J. Charmes
640efc2ed2
Add capabilities check to allow docker to run on kernel that does not have all options
2013-04-18 20:55:41 -07:00
Victor Vieux
1615bb08c7
added -t in docker stop and restart to choose grace period
2013-04-17 11:56:30 +02:00
Guillaume J. Charmes
7b0e96f1f4
Manually pass the env to docker-init instead of relying on lxc to pass it
2013-04-16 14:32:50 -07:00
Solomon Hykes
fdf3308260
Merge remote-tracking branch 'origin/396-disabling_memory_limit-feature'
2013-04-13 21:25:53 -07:00
Solomon Hykes
cdf90bb04b
Merge remote-tracking branch 'origin/96-dns_issue-fix'
2013-04-12 17:50:59 -07:00
Guillaume J. Charmes
1967c8342a
Allow to disable memory limit at compilation time
2013-04-12 10:48:20 -07:00
Guillaume J. Charmes
7673afc843
Allow use to set his own dns via -dns
2013-04-12 10:43:13 -07:00
Solomon Hykes
b1fbebb4a3
Fixed wording of ghost-related messages
2013-04-12 10:39:08 -07:00
Solomon Hykes
3527291b47
Merge remote-tracking branch 'origin/ghost_handling-fix'
2013-04-12 10:33:36 -07:00
Guillaume J. Charmes
bb22cd492e
Add unit test for hanging kill + fix other tests behaviour
2013-04-11 16:21:19 -07:00
Guillaume J. Charmes
313d13ea01
Detect and mark ghost container.
2013-04-11 09:26:17 -07:00
Guillaume J. Charmes
e68c04b722
force kill now use lxc-kill. Fixes #383
2013-04-11 09:04:04 -07:00
Guillaume J. Charmes
1f9f5eed5d
Put the resolv.conf path in a variable instead of being hardcoded within lxc
2013-04-10 18:23:34 -07:00
Solomon Hykes
1b7115a337
Merge remote-tracking branch 'origin/disable_signals-create_escape_sequence'
2013-04-09 12:56:32 -07:00
Guillaume J. Charmes
faa8843650
Look for the escape sequence only in tty mode
2013-04-09 12:55:17 -07:00
Guillaume J. Charmes
0d9e54367f
Fix deadlock on stop failure
2013-04-09 12:06:01 -07:00
Guillaume J. Charmes
1f70b1e15d
Implement an escape sequence in order to be able to detach from a container
2013-04-09 11:06:17 -07:00
Solomon Hykes
1716fccbcc
Merge remote-tracking branch 'origin/change_run_detach_behavious_tty_mode'
2013-04-09 10:39:13 -07:00
Guillaume J. Charmes
7c2b085d1a
Add inconditionnal lock in Start/Stop/Kill to avoid races
2013-04-09 09:09:54 -07:00
Guillaume J. Charmes
64c1b6d9cd
Change the behaviour of CmdRun in tty mode: dont kill the process uppon detach
2013-04-09 08:18:16 -07:00
Guillaume J. Charmes
329f4449dc
Remove the mutexes and use chan instead in order to handle the wait lock
2013-04-09 07:57:59 -07:00
Guillaume J. Charmes
99b5bec069
Fix run disconnect behavious in tty mode + add unit test to enforce it
2013-04-05 19:02:35 -07:00
Guillaume J. Charmes
7d8895545e
Cleanup pty variable names
2013-04-05 17:40:55 -07:00
Guillaume J. Charmes
33a5fe3bd4
Make sure the process start in his own session and grabs the terminal
2013-04-05 17:40:55 -07:00
Guillaume J. Charmes
847a8f45a4
Merge the 3 ptys in 1
2013-04-05 17:40:55 -07:00
Solomon Hykes
793c1ad990
Merge remote-tracking branch 'origin/219-default-bridge-2'
2013-04-05 14:02:16 -07:00
Solomon Hykes
2aad4a3478
Choose which TCP frontend port to allocate with '-p :PORT'
2013-04-04 22:58:01 -07:00
Solomon Hykes
3de51b7bfe
Merge branch 'master' of ssh://github.com/dotcloud/docker
2013-04-04 17:00:59 -07:00
Solomon Hykes
a58cd8c616
Merge pull request #322 from sa2ajj/port-map-nitpick
...
change option description to reflect the semantics
2013-04-04 16:39:54 -07:00
Solomon Hykes
586a79cca0
Merge remote-tracking branch 'dominikh/minor-code-touchups'
2013-04-04 16:20:37 -07:00
Solomon Hykes
26088a72b3
Merge remote-tracking branch 'dominikh/improve-attachopts'
2013-04-04 15:18:41 -07:00
Guillaume J. Charmes
d9a9bfc9c7
Make LXC aware of custom bridge
2013-04-03 16:15:44 -07:00
Dominik Honnef
4f36039e7b
clean up AttachOpts type
...
Primarily, there is no reason to have a pointer to a map. Furthermore,
make() can be used on AttachOpts directly.
2013-04-03 16:06:35 +02:00
Mikhail Sobolev
b74d1c9247
change option description to reflect the semantics
...
At least, for me, 'map' means that there are two values and one is "mapped" to
another.
In this case, just one value is provided (container's port), the other value is
automatically obtained (host's port) and the actual mapping can be seen using
``docker port`` command.
2013-04-03 16:37:56 +03:00
Dominik Honnef
22f1cc955d
replace unreachable returns with panics
...
Not only is this a more common idiom, it'll make finding bugs easier,
and it'll make porting to Go 1.1 easier.
Go 1.1 will not require the final return or panic because it has a
notion of terminating statements.
2013-04-03 11:18:23 +02:00
Solomon Hykes
15c3096e89
Merged attachStdin
2013-04-02 20:46:32 -07:00
Solomon Hykes
22d1622926
Merge remote-tracking branch 'robryk/writebroadcaster-stuff'
2013-04-02 20:35:13 -07:00
Solomon Hykes
c04af2a330
docker run [-a [stdin|stdout|stderr] [...]]: choose which streams to attach to when running a command. Fixes #234 .
2013-04-02 18:07:16 -07:00
Guillaume J. Charmes
ad2bbe23be
Close the broadcaster once they are not needed anymore
2013-04-02 12:19:01 -07:00
Guillaume J. Charmes
6882c78ce4
Add a stdincloser to container.Attach in order to close the client connection when needed
2013-04-02 12:18:20 -07:00
Solomon Hykes
aea2675f7b
Activate Config.StdinOnce at argument parsing
2013-04-02 11:02:19 -07:00
Robert Obryk
a83d87abd4
Renamed writeBroadcaster.Close() to CloseWriters().
2013-04-02 10:45:17 +02:00
Solomon Hykes
c808940c04
Refactored CmdRun and CmdAttach to use Container.Attach
2013-04-01 23:52:20 -07:00
Mikhail Sobolev
f65fc1e766
add host name parameter to "run" command
...
fixes #243
2013-04-02 01:26:17 +03:00
Mikhail Sobolev
dcc9dfb27d
make complex options to stand out
2013-04-02 01:26:17 +03:00
Caleb Spare
c298a91f95
Use a *println or *print function instead of *printf where appropriate.
2013-04-01 12:17:00 -07:00
Solomon Hykes
1632566ecb
Show shorthand image IDs for convenience. Shorthand IDs (or any non-conflicting prefix) can be used to lookup images
2013-03-31 22:11:55 -07:00
Solomon Hykes
a52a28b609
Temporarily disable a broken test (waiting for @creack to fix it), and silence a warning which pollutes unit tests but is complicated to fix
2013-03-31 22:05:14 -07:00
Solomon Hykes
54443c092c
gofmt
2013-03-31 22:04:59 -07:00
Dominik Honnef
6f9a67a7c7
Make IP allocator lazy
...
Instead of allocating all possible IPs in advance, generate them as
needed.
A loop will cycle through all possible IPs in sequential order,
allocating them as needed and marking them as in use. Once the loop
exhausts all IPs, it will wrap back to the beginning. IPs that are
already in use will be skipped. When an IP is released, it will be
cleared and be available for allocation again.
Two decisions went into this design:
1) Minimize memory footprint by only allocating IPs that are actually
in use
2) Minimize reuse of released IP addresses to avoid sending traffic to
the wrong containers
As a side effect, the functions for IP/Mask<->int conversion have been
rewritten to never be able to fail in order to reduce the amount of
error returns.
Fixes gh-231
2013-04-01 06:02:44 +02:00
Guillaume J. Charmes
d949e2804a
Add a check to avoid double start (resulting in dockerd to panic) and unit test for it
2013-03-31 14:15:10 -07:00
Solomon Hykes
0b9a3c86a2
Show shorthand container IDs for convenience. Shorthand IDs (or any non-conflicting prefix) can be used to lookup containers
2013-03-31 02:02:01 -07:00
Guillaume J. Charmes
4760749402
Close the containers stdin when the process dies
2013-03-30 09:08:53 -07:00
Guillaume J. Charmes
7efde5eb83
Fix a scope issue preventing the close of slave stdin pty ( #228 )
2013-03-30 09:07:54 -07:00
Guillaume J. Charmes
5252ab697c
Store the master ptys in order to close them when the process dies ( #228 )
2013-03-30 09:05:53 -07:00
Solomon Hykes
d0d5d5ff09
Merge pull request #265 from dotcloud/formating_debug_harmonize
...
Formating debug harmonize
2013-03-29 21:30:43 -07:00
Guillaume J. Charmes
0f7a4534c1
Do not log non-running containers
2013-03-29 08:46:06 -07:00
Guillaume J. Charmes
7a565a0479
Remove unused variable from container struct
2013-03-29 08:41:48 -07:00
Guillaume J. Charmes
69c2250ec2
Add some error checking in container monitor
2013-03-29 08:29:59 -07:00
Guillaume J. Charmes
d17f78c373
Harmonize the error management. Use fmt.Errorf instead of errors.New
2013-03-29 08:19:42 -07:00
Guillaume J. Charmes
ccac5b1382
Add debug infos
2013-03-29 08:18:43 -07:00
Maxim Treskin
6d72758f12
Remove unnecessary part of paths to lxc executables
2013-03-29 12:07:25 +07:00
Jonathan Rudenberg
a6da7f138c
Camelize some snake_case variable names
2013-03-28 20:12:23 -04:00
Guillaume J. Charmes
cca59081de
#189 Fix the env in TTY mode
2013-03-26 07:01:59 -07:00
shin-
2333be46aa
Re-enabled help for run command and added client-side error messages when arguments are missing
2013-03-26 08:31:26 -07:00
Guillaume J. Charmes
c85db1003b
Force xterm as TERM in tty mode
2013-03-25 19:20:18 -07:00
Guillaume J. Charmes
50bee2f811
Fix termcaps on the linux client
2013-03-25 18:44:05 -07:00
Solomon Hykes
bd63ae72e6
Merge branch 'master' of ssh://github.com/dotcloud/docker
2013-03-25 14:25:17 -07:00
shin-
c8ca50b483
Fixed issue #158 (docker crashes when docker run is called with not enough arguments)
2013-03-25 07:17:11 -07:00
Solomon Hykes
b32436cd2e
Prevent container.Kill() from crashing if container.cmd is nil
2013-03-23 19:51:35 -07:00
Solomon Hykes
6ce64e8458
Moved image name into config. runtime.Create() now receives a single Config parameter
2013-03-23 12:39:09 -07:00
Solomon Hykes
031f91df1a
runtime.Create receives an image name + Config. The Config includes all required runtime information: command, environment, ports etc.
2013-03-23 12:16:58 -07:00
Solomon Hykes
34fbaa5f6d
'docker run -e': set environment variables in a container
2013-03-22 20:36:34 -07:00
Solomon Hykes
ef711962d5
Folded graph/ back into main package
2013-03-21 17:47:23 -07:00
Solomon Hykes
d65983f386
No need for a Container.networkManager field: it can be accessed via Container.runtime
2013-03-21 01:43:03 -07:00
Solomon Hykes
0208b6accd
moved GenerateId() to the graph package
2013-03-21 01:07:07 -07:00
Solomon Hykes
b8547f31e4
Renamed Docker{} to Runtime{} for clarity
2013-03-21 00:41:15 -07:00
Solomon Hykes
7c57a4cfc0
Simplified the core container API, ported it to the new graph. Some features are missing eg. image 'paths' and tags
2013-03-21 00:25:00 -07:00
creack
453d49573c
Put back the github.com path for the import
2013-03-12 11:59:27 -07:00
creack
150a4fe7e5
Merge master within fs
2013-03-12 08:33:21 -07:00
Guillaume J. Charmes
45a8bba15e
gofmt
2013-03-12 05:36:37 -07:00
Guillaume J. Charmes
e0b09d4933
Add "nuke" function to docker tests to avoid disk space waste
2013-03-12 00:08:41 -07:00
Sam Alba
948961831a
Renamed Container property Ram to Memory before it is too late
2013-03-11 19:25:02 -07:00
Sam Alba
75d04a5a75
Added support for RamSwap in the generated LXC config (to limit the swap and have the right default settings)
2013-03-11 17:40:54 -07:00
Solomon Hykes
2548722dae
Fix a bug which caused dockerd to crash at startup if a container didn't have a registered mountpoint
2013-03-11 17:05:01 -07:00
Guillaume J. Charmes
687d6f25ee
Change relative paths to absolute
2013-03-11 02:59:52 -07:00
shin-
5d6199b925
post-merge repairs
2013-03-11 07:39:06 -07:00
shin-
2441edf1a3
Merged upstream changes in fs branch
2013-03-11 05:50:09 -07:00
shin-
97a8209438
Merged master branch into fs
2013-03-11 05:42:36 -07:00
Solomon Hykes
4474cd5677
Fixed a bug which caused docker to crash at startup while restoring existing containers
2013-03-09 19:49:09 -08:00
Solomon Hykes
c59fff422f
gofmt
2013-03-09 19:44:09 -08:00
shin-
93ba6dd82b
Plugged in image store in front-end (some commands are deactivated right now, will progressively reintroduce them
2013-03-08 10:48:22 -08:00
Solomon Hykes
2df0bc6bc0
Container logs are persisted on disk
2013-03-06 16:08:44 -08:00
Andrea Luzzardi
09eacdfade
Container can now take a list of ports to expose in its config
2013-02-28 11:51:14 -08:00
shin-
2ebf3464a1
Halfway through fs branch fixes, TestUser not passing
2013-02-26 17:45:46 -08:00
Andrea Luzzardi
c7f4602b18
Merge from master
2013-02-26 17:32:07 -08:00
Solomon Hykes
ebaa50c4c9
docker wait: block until a container exits, and print its exit code
2013-02-26 11:43:54 -08:00
Andrea Luzzardi
c08f5b2b84
Integrated the network allocator into Docker. A networking environment
...
is assigned to each container upon Start and released whenever the
container exits.
2013-02-25 14:06:22 -08:00
Andrea Luzzardi
5cecd548cd
Basic networking support with hardcoded addresses. Work in progress.
2013-02-21 10:47:57 -08:00
Andrea Luzzardi
0da9ccc18e
Fixed a bug preventing proper reattachment to stdin upon container restart
2013-02-13 19:05:57 -08:00
Andrea Luzzardi
1793538a68
Generate LXC config upon start rather than at container creation
2013-02-13 18:14:46 -08:00
Andrea Luzzardi
6de3e8a22d
Implemented support to run as a different user (through the -u flag)
2013-02-13 17:24:35 -08:00
Andrea Luzzardi
58a2294260
Implemented a self-injecting process wrapper that runs inside the container
...
- Before starting the container, docker injects itself inside the container by mount binding the dockerd binary into /sbin/init
- Instead of running the user process directly inside the container, we run /sbin/init targetprocess [args...]
- When docker is run as /sbin/init (e.g. argv[0] == "/sbin/init"), then its own sys init code kicks in
- The sys init code will be responsible for setting up the process environment prior to its execution (setuid, networking, ...).
- Finally, docker's sys init will exec() the container's process, thus replacing itself with the target binary (which will be running as pid 1)
2013-02-13 14:01:44 -08:00
Andrea Luzzardi
caea45dd72
Container: Improved pseudo-terminal support
2013-01-29 15:51:21 -08:00
Andrea Luzzardi
94b1cf4be3
go fmt
2013-01-29 13:50:27 -08:00
Solomon Hykes
c7a944caf2
List containers ordered by creation time
2013-01-29 03:24:31 -08:00
Solomon Hykes
7a50153c32
'docker run -i' optionally opens stdin. 'docker attach' attaches to a running container (including stdin). 'docker run -t' allocates a tty (still buggy)
2013-01-28 17:50:12 -08:00
Andrea Luzzardi
333abbf85a
go fmt
2013-01-28 14:30:05 -08:00
Solomon Hykes
904b0ab52b
Experimenting with a UI which differentiates images and containers
2013-01-27 15:42:42 -08:00
Solomon Hykes
fc19a00103
Fixed a bug which caused Container.Start() to fail when the rootfs was already mounted.
2013-01-27 01:06:02 -08:00
Solomon Hykes
b6fb5bb21b
Create empty mountpoints (./rw and ./rootfs) every time we create or load a container
2013-01-27 00:49:09 -08:00
Solomon Hykes
5d6dd22fb2
Plugged 4 more commands into the real backend: 'diff', 'reset', 'run', 'stop'. 'run' actually runs the process, but doesn't capture outptu properly, and encounters mount issues
2013-01-26 15:56:42 -08:00
Solomon Hykes
dbc7fb7575
Merge branch 'master' of ssh://github.com/dotcloud/docker
2013-01-25 18:02:56 -08:00
Andrea Luzzardi
6513a1d94e
Fixed a bug preventing containers from running after being restored
2013-01-25 16:20:34 -08:00
Solomon Hykes
fca2625490
Merge branch 'master' of ssh://github.com/dotcloud/docker
2013-01-25 15:42:43 -08:00
Andrea Luzzardi
f4e25694c1
container: Fixed a bunch of race conditions by getting rid of lxc-wait.
2013-01-25 15:36:47 -08:00
Solomon Hykes
11b65a00c6
Container.SetUserData() and GetUserData(): attach optional user data to a container
2013-01-25 14:39:02 -08:00
Andrea Luzzardi
2193b0c954
Docker: Fixed an issue with container unmarshaling which prevented
...
docker.restore() to work properly.
2013-01-25 14:09:21 -08:00
Andrea Luzzardi
f958bdba8a
Fixed lxc-wait race condition. Added unit test to try running multiple
...
containers in parallel.
2013-01-22 17:30:09 -08:00
Andrea Luzzardi
f0c08b57ab
Restart() implementation
2013-01-22 15:03:40 -08:00
Andrea Luzzardi
8e9bb02ce5
Container: Better serialization/reloading support
2013-01-22 11:13:22 -08:00
Andrea Luzzardi
78c02daf47
container.Name -> container.Id
2013-01-21 18:39:52 -08:00
Andrea Luzzardi
24dac22892
Docker: Clean shutdown of containers.
...
Stop() will send a SIGTERM to the init process of the container and give it 10 seconds to shutdown properly.
After the timeout is reached, the process will be force killed (SIGKILL).
Also available is Kill() which kills the process on the spot.
2013-01-21 18:03:23 -08:00