Commit Graph

176 Commits

Author SHA1 Message Date
Isabel Jimenez c809e6a643 Fix double start
Signed-off-by: Isabel Jimenez <contact@isabeljimenez.com>
2016-01-31 19:08:48 -05:00
Victor Vieux aa028f4d09 Host Down containers in ps requires -a
Signed-off-by: Victor Vieux <vieux@docker.com>
2016-01-28 11:28:19 -08:00
Victor Vieux f3a1027bbe update docker info
add test

Signed-off-by: Victor Vieux <vieux@docker.com>
2016-01-27 01:07:52 -08:00
Victor Vieux 13d2212a3a rename 2 handlers
Signed-off-by: Victor Vieux <vieux@docker.com>
2016-01-16 20:29:59 -08:00
Victor Vieux 1225eddc79 allow engine/name support in volumes
Signed-off-by: Victor Vieux <vieux@docker.com>
2016-01-16 17:40:53 -08:00
Victor Vieux 6dcb170808 add buildtime, kernelversion and experimental to API version
Signed-off-by: Victor Vieux <vieux@docker.com>
2016-01-12 02:55:53 -08:00
Victor Vieux 31ad0e047f update godeps
Signed-off-by: Victor Vieux <vieux@docker.com>
2016-01-12 00:38:09 -08:00
Victor Vieux 78008f4d4a add doc
fix tests and keep swarm id
remove duplicate on node reconnect
explicit failure

Signed-off-by: Victor Vieux <vieux@docker.com>
2016-01-11 15:59:44 -08:00
Victor Vieux cc7acf92e7 fix status code when container found on unhealthy node
Signed-off-by: Victor Vieux <vieux@docker.com>
2016-01-04 17:24:10 -08:00
Victor Vieux be0fce961f update code
Signed-off-by: Victor Vieux <vieux@docker.com>
2015-12-22 00:20:04 -08:00
Dong Chen 02553d0727 Cover connection failure error reported by dockerclient and by proxy cases.
Signed-off-by: Dong Chen <dongluo.chen@docker.com>
2015-12-15 19:20:29 -08:00
Victor Vieux cdd42a5c6b display all the containers that are part of a global network on inspect
update godeps

Signed-off-by: Victor Vieux <victorvieux@gmail.com>
2015-12-15 17:48:35 -08:00
Andrea Luzzardi 7291ec144c Merge pull request #1544 from yangdongsheng/sort
api: Sort images by Created.
2015-12-14 22:11:03 -08:00
Dongsheng Yang 5aecaddf72 api: Sort images by Created.
Signed-off-by: Dongsheng Yang <yangds.fnst@cn.fujitsu.com>
2015-12-15 13:15:00 +08:00
Victor Vieux bbbcd0e510 Merge pull request #1384 from dhiltgen/token_auth
Add token pass-thru for Authconfig
2015-12-14 11:22:10 -08:00
Daniel Hiltgen dde577d154 Add token pass-thru for Authconfig
This augments the CreateContainer call to detect the AuthConfig header
and use any supplied auth for pull operations.  This will allow pulling
of protected image on to specific node during the create operation.

CLI usage example using username/password:

    # Calculate the header
    REPO_USER=yourusername
    read -s PASSWORD
    HEADER=$(echo "{\"username\":\"${REPO_USER}\",\"password\":\"${PASSWORD}\"}"|base64 -w 0 )
    unset PASSWORD
    echo HEADER=$HEADER

    # Then add the following to your ~/.docker/config.json
    "HttpHeaders": {
        "X-Registry-Auth": "<HEADER string from above>"
    }

    # Now run a private image against swarm:
    docker run --rm -it yourprivateimage:latest

CLI usage example using registry tokens: (Required engine 1.10 with new auth token support)

    REPO=yourrepo/yourimage
    REPO_USER=yourusername
    read -s PASSWORD
    AUTH_URL=https://auth.docker.io/token
    TOKEN=$(curl -s -u "${REPO_USER}:${PASSWORD}" "${AUTH_URL}?scope=repository:${REPO}:pull&service=registry.docker.io" |
        jq -r ".token")
    HEADER=$(echo "{\"registrytoken\":\"${TOKEN}\"}"|base64 -w 0 )
    echo HEADER=$HEADER

    # Update the docker config as above, but the token will expire quickly...

Signed-off-by: Daniel Hiltgen <daniel.hiltgen@docker.com>
2015-12-11 18:36:55 -08:00
Victor Vieux 4b33656bb4 return proper error for inspect and proxy on unhealthy node
Signed-off-by: Victor Vieux <victorvieux@gmail.com>
2015-12-10 20:05:17 -08:00
Alexandre Beslic 4581e65432 Merge pull request #1438 from dongluochen/networkId
Route network connect/disconnect request to the right engine.
2015-12-04 16:03:54 -08:00
Xian Chaobo 63498b1a80 set MemorySwappiness default value
Signed-off-by: Xian Chaobo <xianchaobo@huawei.com>
2015-12-04 09:25:32 +08:00
Dong Chen 10986a6038 Use ioutil.NopCloser to make copy of http.request.Body.
Signed-off-by: Dong Chen <dongluo.chen@docker.com>
2015-12-02 18:46:16 -08:00
Dong Chen 22ff794c2e Route network connect/disconnect request to the right engine.
Signed-off-by: Dong Chen <dongluo.chen@docker.com>
2015-12-02 18:46:16 -08:00
Shijiang Wei 3f6182c384 fix the panic when "ps -a" with dead containers
Signed-off-by: Shijiang Wei <mountkin@gmail.com>
2015-11-30 22:16:43 +08:00
Xian Chaobo bea12ab8ab add support do with image digest
Signed-off-by: Xian Chaobo <xianchaobo@huawei.com>
2015-11-11 12:11:08 +08:00
Xian Chaobo 5d1fd77aea fix push image
Signed-off-by: Xian Chaobo <xianchaobo@huawei.com>
2015-10-29 20:41:28 +08:00
Victor Vieux 86816e7d44 Merge pull request #1287 from dnephin/fix_filter_images_by_repo
Fix filter images by repo
2015-10-27 21:33:25 -07:00
Victor Vieux 479db2904f fix network inspect via name for global scope
Signed-off-by: Victor Vieux <victorvieux@gmail.com>
2015-10-27 20:40:13 -07:00
Daniel Nephin e001980b5c Add filter by image name support to /images/json
Signed-off-by: Daniel Nephin <dnephin@docker.com>
2015-10-27 11:00:37 -04:00
Victor Costan e32b3211ae Swarm filters support in image building.
When building an image (POST /build), swarm will extract filters from
buildargs. This is similar to how container creation (POST
/containers/create) extracts filters from environment variables.

Signed-off-by: Victor Costan <costan@gmail.com>
2015-10-23 14:24:42 -04:00
Victor Vieux 95c1147b73 return 200 OK in /images/create
Signed-off-by: Victor Vieux <victorvieux@gmail.com>
2015-10-22 09:09:09 -07:00
Alexandre Beslic 975eaa9e73 Merge pull request #1320 from dnephin/support_filter_networks
Support filtering networks by id or name
2015-10-21 17:45:56 -07:00
Alexandre Beslic e5523c250a Merge pull request #1321 from vieux/update_endpoint_volume_create
rename `POST /volumes` to `POST /volumes/create`
2015-10-21 16:17:50 -07:00
Daniel Nephin cd5de97a8d Update api version to match the version that swarm supports.
Signed-off-by: Daniel Nephin <dnephin@docker.com>
2015-10-21 15:44:02 -04:00
Daniel Nephin a7550e9e70 Support filtering networks by id or name.
Signed-off-by: Daniel Nephin <dnephin@docker.com>
2015-10-21 14:23:26 -04:00
Victor Vieux 6643894063 rename `POST /volumes` to `POST /volumes/create`
Signed-off-by: Victor Vieux <vieux@docker.com>
2015-10-17 23:50:50 -07:00
Victor Vieux 4e1ae773e2 improve docker network ls and rm
Signed-off-by: Victor Vieux <victorvieux@gmail.com>
2015-10-19 15:42:56 -07:00
Andrea Luzzardi 58558f5224 Fix various golint issues.
Signed-off-by: Andrea Luzzardi <aluzzardi@gmail.com>
2015-10-19 13:58:21 -07:00
Patrick Devine fe73803861 Add error messages when pulling/loading images
This change adds error strings when there is an error while pulling or
loading an image.

Signed-off-by: Patrick Devine <patrick.devine@docker.com>
2015-10-16 14:58:07 -07:00
Victor Vieux e5eeec580c use overlay as default in swarm
Signed-off-by: Victor Vieux <vieux@docker.com>
2015-10-08 22:36:13 -07:00
Victor Vieux 78ecf8497c Add network rm
Signed-off-by: Victor Vieux <vieux@docker.com>
2015-10-08 22:36:13 -07:00
Victor Vieux b007cae8b2 Add docker network create
Signed-off-by: Victor Vieux <vieux@docker.com>
2015-10-08 22:35:07 -07:00
Victor Vieux 8559fb0fc6 remove cluster.Network(IDOrName)
Signed-off-by: Victor Vieux <vieux@docker.com>
2015-10-08 22:35:07 -07:00
Victor Vieux 12c2d46dd5 prepend engine name on network name
Signed-off-by: Victor Vieux <victorvieux@gmail.com>
2015-10-08 22:35:07 -07:00
Victor Vieux e634df03a7 add 'docker network ls' support
add 'docker network inspect' suport

Signed-off-by: Victor Vieux <vieux@docker.com>
2015-10-08 22:35:07 -07:00
Alexandre Beslic 5f807caef1 Merge pull request #1252 from vieux/fix_detach_exec
fix exec -d
2015-10-08 18:32:07 -07:00
Daniel Nephin 8abf7d32e9 Support filtering images by labels
Signed-off-by: Daniel Nephin <dnephin@docker.com>
2015-10-02 15:45:52 -04:00
Victor Vieux 26785556fa fix exec -d
Signed-off-by: Victor Vieux <vieux@docker.com>
2015-10-01 07:29:38 -07:00
Alexandre Beslic a792519978 Merge pull request #1208 from vieux/volume_create_delete
docker volume create & docker volume delete
2015-09-23 10:45:44 -07:00
Xian Chaobo 063f5dbab4 Merge pull request #1204 from MHBauer/events-until
implement `--until` flag for swarm api
2015-09-22 09:13:02 +08:00
Morgan Bauer b1d3b625de
implement `--until` flag for swarm api
- mostly copied the idea from base docker
 - refactored the locking in event handling
 - integration test for until flag

Signed-off-by: Morgan Bauer <mbauer@us.ibm.com>
2015-09-18 14:20:30 -07:00
Victor Vieux 79d1ee4861 add volume create
Signed-off-by: Victor Vieux <vieux@docker.com>
2015-09-18 03:23:22 -07:00
Victor Vieux 440a379860 docker volume rm
Signed-off-by: Victor Vieux <vieux@docker.com>
2015-09-18 03:22:57 -07:00
Xian Chaobo 5cc6e3f30c fix import/load return code
Signed-off-by: Xian Chaobo <xianchaobo@huawei.com>
2015-09-15 10:00:49 -04:00
Xian Chaobo a10a39c462 fix pull return code
Signed-off-by: Xian Chaobo <xianchaobo@huawei.com>
2015-09-10 04:10:28 -04:00
Chanwit Kaewkasi 30cfdfb12d Merge pull request #1196 from vieux/initial_volume_support
add support for docker volume ls & inspect
2015-09-09 09:56:39 +07:00
Victor Vieux 77c96908f0 add support for docker volume ls & inspect
Signed-off-by: Victor Vieux <vieux@docker.com>
2015-09-05 07:56:22 -07:00
Chanwit Kaewkasi 45e091bca5 implement grouping list of images by Id
Signed-off-by: Chanwit Kaewkasi <chanwit@gmail.com>
2015-09-04 02:15:05 +07:00
Victor Vieux d571b7e39e Revert "prevent double starts with mesos"
This reverts commit 9a93dcf46b.

Signed-off-by: Victor Vieux <vieux@docker.com>
2015-09-02 20:33:49 -07:00
Chanwit Kaewkasi 4cdbe875b8 Merge pull request #1155 from vieux/fix_mesos_logs
prevent double logs with mesos
2015-09-03 13:10:52 +07:00
Victor Vieux 42bb1f3f5b Merge pull request #1159 from jimmyxian/fix-tag-images
fix tag image
2015-09-01 11:25:48 -07:00
Victor Vieux 9a93dcf46b prevent double starts with mesos
Signed-off-by: Victor Vieux <vieux@docker.com>
2015-08-31 22:52:43 -07:00
Xian Chaobo 29df83a349 fix tag image
Signed-off-by: Xian Chaobo <xianchaobo@huawei.com>
2015-08-31 07:17:30 -04:00
Xian Chaobo 12e956e681 add support force remove images
Signed-off-by: Xian Chaobo <xianchaobo@huawei.com>
2015-08-19 23:09:02 -04:00
Xian Chaobo d4daee4f27 add support images -a
Signed-off-by: Xian Chaobo <xianchaobo@huawei.com>
2015-08-12 07:39:11 -04:00
Victor Vieux 31932311a1 add support for --before in ps
Signed-off-by: Victor Vieux <vieux@docker.com>
2015-08-01 16:41:48 -07:00
Xian Chaobo fdcb59b4ec fix load api
Signed-off-by: Xian Chaobo <xianchaobo@huawei.com>
2015-08-05 02:44:54 -04:00
Andrea Luzzardi 3bb4373f9f Merge pull request #1111 from vieux/no_json_manual
do not generate JSON by hand
2015-08-04 15:30:30 -07:00
Xian Chaobo a3cf5b9e9c improve build
Signed-off-by: Xian Chaobo <xianchaobo@huawei.com>
2015-08-04 02:45:06 -04:00
Victor Vieux 7ec33a81b5 do not generate JSON by hand
Signed-off-by: Victor Vieux <vieux@docker.com>
2015-07-30 18:10:13 -07:00
Alexandre Beslic 02ba1fad43 Merge pull request #1032 from vieux/fix_match_push
fix image matching in push
2015-07-14 17:02:01 -07:00
Ryan Graham 9bd9fee7d6 preserve status code from POST /containers/*/exec
The docker remote API specifies that a 201 is returned on successful
creation of an Exec and a strict client will not accept that being
turned into a 200.

https://docs.docker.com/reference/api/docker_remote_api_v1.19/#exec-create

Resolves #1055

Signed-off-by: Ryan Graham <r.m.graham@gmail.com>
2015-07-12 15:31:59 -07:00
Victor Vieux 0268b1ce89 /info now returns SystemTime
Signed-off-by: Victor Vieux <victorvieux@gmail.com>
2015-07-06 17:56:35 -07:00
Victor Vieux e10b4555e7 add name, http_proxy, https_proxy and no_proxy to docker info
Signed-off-by: Victor Vieux <vieux@docker.com>
Signed-off-by: Victor Vieux <victorvieux@gmail.com>
2015-07-06 15:17:48 -07:00
Victor Vieux a54763ca55 fix image matching in push
Signed-off-by: Victor Vieux <victorvieux@gmail.com>
2015-07-06 14:57:44 -07:00
Victor Vieux 126eade4b9 remove 2 warnings in docker info
Signed-off-by: Victor Vieux <victorvieux@gmail.com>
2015-06-30 15:20:44 -07:00
Andrea Luzzardi d63de2da48 leader election: Display replica status in docker info.
Signed-off-by: Andrea Luzzardi <aluzzardi@gmail.com>
2015-06-11 18:56:02 -07:00
Victor Vieux c1020da636 nits
Signed-off-by: Victor Vieux <victorvieux@gmail.com>
2015-06-04 18:25:51 -07:00
Victor Vieux 4f9c9f5867 use dockerclient structs
Signed-off-by: Victor Vieux <victorvieux@gmail.com>
2015-06-04 18:25:51 -07:00
Victor Vieux 2bf6c1a529 improve docker infi with 1.7
Signed-off-by: Victor Vieux <victorvieux@gmail.com>
2015-06-04 18:25:51 -07:00
Victor Vieux fb63a90610 add images to docker info
Signed-off-by: Victor Vieux <victorvieux@gmail.com>
2015-06-02 10:53:19 -07:00
Xian Chaobo 1f20358b5d add support import
Signed-off-by: Xian Chaobo <xianchaobo@huawei.com>
2015-05-27 22:11:03 +08:00
Victor Vieux 0b24992d7c Merge pull request #815 from jimmyxian/rmi_by_name
Fix image match
2015-05-26 10:43:59 -07:00
Andrea Luzzardi a3950e7f65 Merge pull request #796 from jimmyxian/refresh-container
Add Refresh container
2015-05-21 18:30:47 -07:00
Victor Vieux 89d3c2a4cb Merge pull request #814 from jimmyxian/fix-bool-value
Fix #810 bool value
2015-05-20 10:09:11 -07:00
Xian Chaobo e6ce59794e merge two image match func
Signed-off-by: Xian Chaobo <xianchaobo@huawei.com>
2015-05-19 21:39:10 -04:00
Xian Chaobo 064e91cd23 fix image match and fix docker save
Signed-off-by: Xian Chaobo <xianchaobo@huawei.com>
2015-05-19 05:21:14 -04:00
Xian Chaobo 24eb0adbb0 fix #810 bool value
Signed-off-by: Xian Chaobo <xianchaobo@huawei.com>
2015-05-19 04:01:41 -04:00
Andrea Luzzardi dd48440d98 api: "Host Down" instead of "Pending" as a status
Signed-off-by: Andrea Luzzardi <aluzzardi@gmail.com>
2015-05-18 13:55:13 -07:00
Xian Chaobo 014947daad refresh before closing the connection
Signed-off-by: Xian Chaobo <xianchaobo@huawei.com>
2015-05-18 04:52:37 -04:00
Xian Chaobo 4af3e30f64 Fix:#748 add refresh container
Signed-off-by: Xian Chaobo <xianchaobo@huawei.com>
2015-05-15 04:46:02 -04:00
Victor Vieux 2cb0395acf remove images by name or ID, not always ID
Signed-off-by: Victor Vieux <victorvieux@gmail.com>
2015-05-14 15:22:06 -07:00
Victor Vieux b73f54def4 APIVersion -> ApiVersion to match docker API
Signed-off-by: Victor Vieux <victorvieux@gmail.com>
2015-05-13 17:12:16 -07:00
Victor Vieux a9eb48dcf2 Merge pull request #745 from aluzzardi/swarm-id
Support for Swarm IDs
2015-05-12 15:12:19 -07:00
Andrea Luzzardi bdd97c1d72 swarm id: Fix proxy for execs.
Signed-off-by: Andrea Luzzardi <aluzzardi@gmail.com>
2015-05-12 14:21:09 -07:00
Andrea Luzzardi dde47ee650 swarm IDs: Convert Swarm ID to Container ID in API Proxy.
Signed-off-by: Andrea Luzzardi <aluzzardi@gmail.com>
2015-05-11 16:56:08 -07:00
Andrea Luzzardi b6a7c3d7f5 swarm ID: Remove backward compatibility.
Signed-off-by: Andrea Luzzardi <aluzzardi@gmail.com>
2015-05-11 16:56:08 -07:00
Andrea Luzzardi 5c801d2c6a swarm id: Handle compatibility.
Containers created with Swarm<0.3.0 or directly on the host without
going through Swarm don't have a Swarm ID. We are going to fake it by
using the Container ID.

Signed-off-by: Andrea Luzzardi <aluzzardi@gmail.com>
2015-05-11 16:56:08 -07:00
Andrea Luzzardi 9e2863ec71 api: getImages: changed error message
Signed-off-by: Andrea Luzzardi <aluzzardi@gmail.com>
2015-05-11 16:44:15 -07:00
Andrea Luzzardi 7403991cac API: Simplify getImages.
Signed-off-by: Andrea Luzzardi <aluzzardi@gmail.com>
2015-05-11 16:44:15 -07:00
Xian Chaobo 42af0fadd7 fix var name and integration test
Signed-off-by: Xian Chaobo <xianchaobo@huawei.com>
2015-05-11 16:44:15 -07:00
Xian Chaobo 3962f6ffdf add-support-images-save
Signed-off-by: Xian Chaobo <xianchaobo@huawei.com>
2015-05-11 16:44:15 -07:00