Commit Graph

351 Commits

Author SHA1 Message Date
2b6c63642e Fix panic in validate context for build
Fixes #7611

Signed-off-by: Michael Crosby <michael@docker.com>
Upstream-commit: cd776cdd77239353d8bd17d3e05d66665f381157
Component: engine
2014-08-25 14:25:31 -07:00
cb2b33e883 Skip permissions check on named pipes
Fixes #7680

Signed-off-by: Alexandr Morozov <lk4d4math@gmail.com>
Upstream-commit: 07f2e794867030c755901ae5479df03e3c4ce189
Component: engine
2014-08-25 22:59:53 +04:00
b8d5783511 move utils.Fataler to pkg/log.Fataler
Docker-DCO-1.1-Signed-off-by: Erik Hollensbe <github@hollensbe.org> (github: erikh)
Upstream-commit: ac63d925d2618e700d117c5d9e402ccc0c5cecc8
Component: engine
2014-08-13 15:32:41 -07:00
4737f7cea5 Extract log utils into pkg/log
Docker-DCO-1.1-Signed-off-by: Josiah Kiehl <josiah@capoferro.net> (github: capoferro)
Upstream-commit: a02f67be5b17da63d475e6f35956c1e72c3b2e7b
Component: engine
2014-08-13 15:18:15 -07:00
bdc2cfec82 Merge pull request #7329 from erikh/move_broadcastwriter
Cleanup: utils/broadcastwriter -> pkg/broadcastwriter
Upstream-commit: bc9f5cdeb5c000de5be291a5628d6eb99c1ab91d
Component: engine
2014-08-07 14:51:42 -07:00
325695b856 utils.Debugf -> log.Printf, move jsonlog to own package.
Docker-DCO-1.1-Signed-off-by: Erik Hollensbe <github@hollensbe.org> (github: erikh)
Upstream-commit: 5cdb9c8acab75df74d20cd937e4091dacb355160
Component: engine
2014-08-06 16:39:01 -07:00
00eca7c915 utils/broadcastwriter -> pkg/broadcastwriter
Docker-DCO-1.1-Signed-off-by: Erik Hollensbe <github@hollensbe.org> (github: erikh)
Upstream-commit: 5ab09f2f7129225220fc9c0b76b2e2aec6823ee1
Component: engine
2014-08-06 16:37:01 -07:00
a195939eec Separate events subsystem
* Events subsystem merged from `server/events.go` and
  `utils/jsonmessagepublisher.go` and moved to `events/events.go`
* Only public interface for this subsystem is engine jobs
* There is two new engine jobs - `log_event` and `subscribers_count`
* There is auxiliary function `container.LogEvent` for logging events for
  containers

Docker-DCO-1.1-Signed-off-by: Alexandr Morozov <lk4d4math@gmail.com> (github: LK4D4)
[solomon@docker.com: resolve merge conflicts]
Signed-off-by: Solomon Hykes <solomon@docker.com>
Upstream-commit: 8d056423f8c433927089bd7eb6bc97abbc1ed502
Component: engine
2014-08-06 10:08:19 +00:00
05babb14b7 Docker should use /var/lib/container/tmp for large temporary files.
/tmp is often a tmpfs file system and large temporary files could cause
docker commands to fail.  Also using /tmp potentially allows users on the
system to get access to content, or even attack the content.  Moving the tmpdir to
/var/lib/container/tmp will protect the data.

Docker-DCO-1.1-Signed-off-by: Dan Walsh <dwalsh@redhat.com> (github: rhatdan)

Conflicts:
	docker/docker.go
Upstream-commit: b4813f2841638be28208b7b1602f12750a46ece9
Component: engine
2014-08-05 16:43:42 -04:00
1d296af9b5 Merge pull request #7357 from crosbymichael/docker-ignore
Fix .dockerignore when ignoring unreadable dirs
Upstream-commit: c5cdbc376ffaa1ed9db038e93acaa1fc689433b6
Component: engine
2014-07-31 15:19:50 -07:00
604012d742 Fix .dockerignore when ignoring unreadable dirs
The initial `ValidateContextDirectory` implementation fails loudly when a file
lacks read permissions in the current context. However that situation is valid
if the file is included in the `.dockerignore` patterns.

Docker-DCO-1.1-Signed-off-by: Bruno Renié <brutasse@gmail.com> (github: brutasse)
Upstream-commit: 27cca4c70cc7f0cccfda693ca7bbb2422eec3e13
Component: engine
2014-07-31 15:10:56 -07:00
be277e6761 Merge pull request #7324 from erikh/move_tarsum
Move tarsum to pkg/
Upstream-commit: 531f5907d64ff56b0beea1de11d65885e29ee5ad
Component: engine
2014-07-31 16:56:24 -04:00
8be33461d7 Remove CheckSum from utils; replace with a TeeReader
Docker-DCO-1.1-Signed-off-by: Erik Hollensbe <github@hollensbe.org> (github: erikh)
Upstream-commit: ef6b78f7db890a79b40484fd892ff486017ff2e9
Component: engine
2014-07-30 11:23:43 -07:00
3d1163e7b4 move testdata to tarsum package.
Docker-DCO-1.1-Signed-off-by: Erik Hollensbe <github@hollensbe.org> (github: erikh)
Upstream-commit: 4184cccb0f291b329292da1a31108407cb1a4750
Component: engine
2014-07-30 06:52:24 -07:00
5a8e5fe7dc utils/tarsum* -> pkg/tarsum
Docker-DCO-1.1-Signed-off-by: Erik Hollensbe <github@hollensbe.org> (github: erikh)
Upstream-commit: 1219e458d105461fd7de23fa4b04a1233f61f8a4
Component: engine
2014-07-30 06:42:12 -07:00
e25f77248d Move parsing functions to pkg/parsers and the specific kernel handling
functions to pkg/parsers/kernel, and parsing filters to
pkg/parsers/filter. Adjust imports and package references.

Docker-DCO-1.1-Signed-off-by: Erik Hollensbe <github@hollensbe.org> (github: erikh)
Upstream-commit: 4398108433121ce2ac9942e607da20fa1680871a
Component: engine
2014-07-29 13:09:10 -07:00
b812e976e3 Merge pull request #7272 from unclejack/create_httputils_pkg
move resumablerequestreader to pkg/httputils
Upstream-commit: 3bae02cbe32b856107a5d61c496f35d69c35aa2d
Component: engine
2014-07-29 12:18:10 -07:00
b7f9603931 move resumablerequestreader to pkg
Docker-DCO-1.1-Signed-off-by: Cristian Staretu <cristian.staretu@gmail.com> (github: unclejack)
Upstream-commit: c0517857f64d1148d02809e3ba3dd39bf8322ed3
Component: engine
2014-07-29 16:30:45 +03:00
b178420296 jsonmessage: added test and cleaned up others
Docker-DCO-1.1-Signed-off-by: Vincent Batts <vbatts@redhat.com> (github: vbatts)
Upstream-commit: 704b97d1c4cc6eaa6ecf9630eed2dffd5abaffb9
Component: engine
2014-07-28 14:43:28 -04:00
ddd05d0cc1 progress bar: don't strings.Repeat a negative number
Docker-DCO-1.1-Signed-off-by: Vincent Batts <vbatts@redhat.com> (github: vbatts)
Upstream-commit: 77237be0e23dfaba4d4d97a525c3ecc7fb819042
Component: engine
2014-07-28 12:01:43 -04:00
1da81ba363 Fix io.Reader ambiguity on EOF in progressreader
Docker-DCO-1.1-Signed-off-by: Tibor Vass <teabee89@gmail.com> (github: tiborvass)
Upstream-commit: caa57699283fd0fa47cac59c80adcacaa5c9950e
Component: engine
2014-07-25 19:26:27 -04:00
6ae4c9014c update go import path and libcontainer
Docker-DCO-1.1-Signed-off-by: Victor Vieux <vieux@docker.com> (github: vieux)
Upstream-commit: b3ee9ac74e171e00f14027e39278013629e681b8
Component: engine
2014-07-24 22:19:50 +00:00
c7d6337458 resumablerequestreader: allow initial response
Make it possible to inspect an initial response and pass it to
ResumableRequestReader. This makes it possible to inspect an initial
response and passing it to ResumableRequestReader to avoid making an
extra request.

Docker-DCO-1.1-Signed-off-by: Cristian Staretu <cristian.staretu@gmail.com> (github: unclejack)
Upstream-commit: f033ce3ee9ee055612acacde537687e41865e14f
Component: engine
2014-07-21 19:54:25 +03:00
669e2fe479 add basic support for 'all'
Docker-DCO-1.1-Signed-off-by: Victor Vieux <vieux@docker.com> (github: vieux)
Upstream-commit: 222a6f44016451dcbd2da0003e64521c06e88ba9
Component: engine
2014-07-11 23:43:21 +00:00
ca489c2f49 Basic --cap-add and --cap-drop support for native
Docker-DCO-1.1-Signed-off-by: Victor Vieux <vieux@docker.com> (github: vieux)
Upstream-commit: 94e6dc978134b61a2b30aa9118f98f6fadd10535
Component: engine
2014-07-11 23:43:21 +00:00
34b700c7bf Updated docker logs timestamp to RFC3339
Currently the docker logs timestamp flag generates log entries like:

    $ sudo docker logs -ft daemon_dave
    [May 10 13:06:17.934] hello world

It uses Go's StampMilli timestamp to generate the timestamp. The entry
is also wrapped in [ ].

This is non-standard operational timestamp and one that will require
custom parsing.

The new timestamp is RFC3999Nano and generates entries like:

    2014-05-10T17:42:14.999999999Z07:00 hello world

These are readily parsed by tools like ELK.

Docker-DCO-1.1-Signed-off-by: James Turnbull <james@lovedthanlost.net> (github: jamtur01)

Docker-DCO-1.1-Signed-off-by: Tibor Vass <teabee89@gmail.com> (github: tiborvass)
Upstream-commit: aa0eca03e6662c5f6b4f0f47190a45f49b61e357
Component: engine
2014-07-09 11:59:06 -04:00
31988404b5 BroadcastWriter refactoring
It became slightly faster and lighter
possibly fixes #5923 problems

Docker-DCO-1.1-Signed-off-by: Alexandr Morozov <lk4d4math@gmail.com> (github: LK4D4)
Upstream-commit: 7bdd23bfeec1968a3061e63e24af049837baf4c4
Component: engine
2014-07-03 10:12:53 +04:00
eec6ca2f45 Benchmark for BroadcastWriter
Docker-DCO-1.1-Signed-off-by: Alexandr Morozov <lk4d4math@gmail.com> (github: LK4D4)
Upstream-commit: a8d95b7c573dedad26395372dd0d4ff8882f6cb6
Component: engine
2014-07-03 10:06:58 +04:00
4d29e9b718 Move WriteBroadcaster to separate package as BroadcastWriter
Docker-DCO-1.1-Signed-off-by: Alexandr Morozov <lk4d4math@gmail.com> (github: LK4D4)
Upstream-commit: 9d4e80222144c0aef3e78202ecb4904b3ce5ed9b
Component: engine
2014-07-02 23:31:06 +04:00
1ce22444ec Move truncindex in separate package in pkg/
Docker-DCO-1.1-Signed-off-by: Alexandr Morozov <lk4d4math@gmail.com> (github: LK4D4)
Upstream-commit: ed032ddfd68a8654671a13d676c0f7539e36a10b
Component: engine
2014-06-24 21:19:15 +04:00
7e8e4bdc76 Fix stdcopy when reads large frame at once
Fixes TestLogsContainerMuchBiggerThanPage with go 1.3(#6520)
Docker-DCO-1.1-Signed-off-by: Alexandr Morozov <lk4d4math@gmail.com> (github: LK4D4)
Upstream-commit: d17c92965937bbc3181b73bb8a4e21ecee217e5f
Component: engine
2014-06-19 21:42:55 +04:00
d80bc787e6 Merge pull request #6257 from proppy/test-conntimeout
utils: add test for TimeoutConn
Upstream-commit: 1ca7964cdd6ee1b34067593e9196c9415345199f
Component: engine
2014-06-18 16:23:39 -07:00
172faefd3c Fix go vet errors
Docker-DCO-1.1-Signed-off-by: Alexandr Morozov <lk4d4math@gmail.com> (github: LK4D4)

Docker-DCO-1.1-Signed-off-by: Victor Vieux <vieux@docker.com> (github: vieux)
Upstream-commit: f08cd445b0d2e44a4977a3bd0dca0a1cd4e76d2f
Component: engine
2014-06-18 17:39:57 +00:00
3fdde76d71 Merge pull request #6490 from icecrime/6203-artifacts_on_events_output
Avoid erasing line for non-progress messages
Upstream-commit: f0ec9018194e9fddecfde29050aed1169c1fe94c
Component: engine
2014-06-17 16:26:51 -07:00
1d007f754c Merge pull request #6199 from icecrime/event_subscription_refactoring
Event subscription refactoring
Upstream-commit: d0fe1147ea6bb98e87a573f078e1572f6061e04b
Component: engine
2014-06-17 17:39:28 -04:00
43d16abb08 Merge pull request #6320 from LK4D4/fix_stdcopy_eof
Don't exit on eof in header reading in stdcopy
Upstream-commit: 4dcf4e9bd0e9c68369dd73fb8dfbf419e0ab68d6
Component: engine
2014-06-17 14:20:13 -07:00
c5861c6a61 Avoid erasing line for non-progress messages
The JSONMessage.Display methods erases the entire line by outputting the <ESC>[2K\r sequence before displaying the message content. This is not necessary for messages other than progress indicators, and introduces unwanted characters in the /events output.

Fixes #6203.

Docker-DCO-1.1-Signed-off-by: Arnaud Porterie <icecrime@gmail.com> (github: icecrime)
Upstream-commit: 3807f8b708b60588526f555190d14a37db408450
Component: engine
2014-06-17 22:40:34 +02:00
5ad6516933 Refactor events publishing
Events subscription (/events API endpoint) attributes pseudo-unique identifiers to incoming subscribers: originally its host, then its subscription time. This is unecessary and leads to code complexity.

Introduce a JSONMessagePublisher to provide simple pub/sub mechanism for JSONMessage, and rely on this new type to publish events to all subscribed listeners. The original logic is kept for the 'since' and 'until' parameters, and for client disconnection handling.

Docker-DCO-1.1-Signed-off-by: Arnaud Porterie <icecrime@gmail.com> (github: icecrime)
Upstream-commit: d0c4e448632f49b73bf63862a4b20b142ff7f2c9
Component: engine
2014-06-17 21:56:22 +02:00
6c57622b2a Don't exit on eof in header reading in stdcopy
There was random lines drops in docker logs because of this
Docker-DCO-1.1-Signed-off-by: Alexandr Morozov <lk4d4math@gmail.com> (github: LK4D4)
Upstream-commit: b1bae925341f45736fcafaeaf8c75274e9ad4305
Component: engine
2014-06-11 15:13:31 +04:00
bef7d7d621 Fixed up if statement
Signed-off-by: Levi Gross <levi@levigross.com>

Docker-DCO-1.1-Signed-off-by: Levi Gross <levi@levigross.com> (github: levigross)
Upstream-commit: a7b60b21deaf7dbc3b5741be036bfb2a6679f1c8
Component: engine
2014-06-10 10:02:00 -04:00
b48e5d47f7 utils: add test for TimeoutConn
Docker-DCO-1.1-Signed-off-by: Johan Euphrosine <proppy@google.com> (github: proppy)
Upstream-commit: 39320f9393b27dd6239a2356086abc8439c1614b
Component: engine
2014-06-07 15:11:57 -07:00
ddc2df6d84 IANA allocated Docker port: 2375
2375/2376 are assigned:
http://www.iana.org/assignments/service-names-port-numbers/service-names-port-numbers.xhtml?search=docker

For #1440

Docker-DCO-1.1-Signed-off-by: SvenDowideit <SvenDowideit@home.org.au> (github: SvenDowideit)
Upstream-commit: 5febba93babcf8c4b01862e88b6f6e11a1532bc8
Component: engine
2014-06-04 06:54:19 +10:00
7d08ad30f3 Merge pull request #4430 from vbatts/vbatts-images_orphan
Adding -f untagged=true flag to `docker images`
Upstream-commit: 5aeb77296a974e512a533f9014376ce837f05b50
Component: engine
2014-06-03 20:33:56 +03:00
72a70c7e5f Merge pull request #5848 from unclejack/resumable_pulls
resume pulling the layer on disconnect
Upstream-commit: b292928cd5414e3fc3452d409e490460adbd5e51
Component: engine
2014-06-02 14:07:01 -07:00
353629f404 filters: don't encode an empty set. update comments
Docker-DCO-1.1-Signed-off-by: Vincent Batts <vbatts@redhat.com> (github: vbatts)
Upstream-commit: 3a4e3ca3277fef8f1d88858fa5a3e149a897f8ae
Component: engine
2014-06-02 16:33:52 -04:00
2a107417ae filters: use json marshal, instead of beam/data
Docker-DCO-1.1-Signed-off-by: Vincent Batts <vbatts@redhat.com> (github: vbatts)
Upstream-commit: 89a15fa235f0aab6dd326a3737260c983f0fc22b
Component: engine
2014-06-02 16:33:52 -04:00
2dd212e295 filter flag: split out for separate --filter flags
adding tests and allowing for easy passing of filters.Args from client
to server.

Docker-DCO-1.1-Signed-off-by: Vincent Batts <vbatts@redhat.com> (github: vbatts)
Upstream-commit: f1cc7ce5d728d6bdb1b3ab668e36fb1fc66515ff
Component: engine
2014-06-02 16:33:51 -04:00
9030fc74aa filters: cleanup & fmt
Docker-DCO-1.1-Signed-off-by: Vincent Batts <vbatts@redhat.com> (github: vbatts)
Upstream-commit: babd5720157898bb33d806bda920d9f9f2df73f0
Component: engine
2014-06-02 16:33:51 -04:00
1771a9601a filters: remove out filter proc prototype
Docker-DCO-1.1-Signed-off-by: Vincent Batts <vbatts@redhat.com> (github: vbatts)
Upstream-commit: caf9b19b0c444467aff493781afb66df923250ff
Component: engine
2014-06-02 16:33:50 -04:00
f90ca07ea9 filters, for images: start with untagged/tagged boolean
This is a new feature and flag. (replaces the suggestion of a flag for
--untagged images).
The concept is to have a syntax to filter. This begins with this
filtering for the 'images' subcommand, and at that only filtering for
whether images are untagged.
  example like: docker rmi $(docker images -q --filter 'untagged=true')

Docker-DCO-1.1-Signed-off-by: Vincent Batts <vbatts@redhat.com> (github: vbatts)
Upstream-commit: 5f3812ec97f9a951bceb482fdcd355b6cbc1b113
Component: engine
2014-06-02 16:33:50 -04:00