Commit Graph

94 Commits

Author SHA1 Message Date
be83c11fb0 Add canonical import comment
Signed-off-by: Daniel Nephin <dnephin@docker.com>
Upstream-commit: 4f0d95fa6ee7f865597c03b9e63702cdcb0f7067
Component: engine
2018-02-05 16:51:57 -05:00
fd08bae89c Remove redundant build-tags
Files that are suffixed with `_linux.go` or `_windows.go` are
already only built on Linux / Windows, so these build-tags
were redundant.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: 6ed1163c98703f8dd0693cecbadc84d2cda811c3
Component: engine
2017-12-18 17:41:53 +01:00
eefbd135ae Remove solaris build tag and `contrib/mkimage/solaris
Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
Upstream-commit: 4785f1a7ab7ec857dc3ca849ee6ecadf519ef30e
Component: engine
2017-11-02 00:01:46 +00:00
d78181e968 Remove solaris files
For obvious reasons that it is not really supported now.

Signed-off-by: Michael Crosby <crosbymichael@gmail.com>
Upstream-commit: 5a9b5f10cf967f31f0856871ad08f9a0286b4a46
Component: engine
2017-10-24 15:39:34 -04:00
46c885c3e3 Use all console mode constants from go-ansiterm
The missing console mode constants were added to go-ansiterm in
Azure/go-ansiterm#23. Use these constants instead of defining them
locally.

Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
Upstream-commit: 9335683fa50c4863ada4bf00a30e7dfbfef3c783
Component: engine
2017-10-02 09:49:20 +02:00
fdd3e06a77 Add ineffassign linter
Also enable GC in linting to reduce memory usage.

Signed-off-by: Daniel Nephin <dnephin@docker.com>
Upstream-commit: 09652bf8789142a5a5a1de2d41590300761b4954
Component: engine
2017-09-08 18:23:21 -04:00
7ded486a94 Merge pull request #34700 from tklauser/pkg-term-winsize
pkg/term: use IoctlGetWinsize/IoctlSetWinsize from golang.org/x/sys/unix
Upstream-commit: a127269803b9053713cd51d20f4ae00dae19b6d1
Component: engine
2017-09-01 15:58:25 -04:00
2be7b6733b pkg/term: use IoctlGetWinsize/IoctlSetWinsize from golang.org/x/sys/unix
Use unix.IoctlGetWinsize and unix.IoctlSetWinsize instead of manually
reimplementing them.

Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
Upstream-commit: 32dfc0cb64992aa5e208273658b6e404268c63f4
Component: engine
2017-09-01 14:43:09 +02:00
01392057b0 Add unconvert linter
Signed-off-by: Daniel Nephin <dnephin@docker.com>
Upstream-commit: 2f5f0af3fdb7e9ee607a0e178dbe2af6e10cccf4
Component: engine
2017-08-24 15:08:31 -04:00
fd944ce735 pkg/term: set termios VMIN and VTIME in MakeRaw on Linux
The BSD and Solaris versions of term.MakeRaw already set VMIN and VTIME
explicitly such that a read returns when one character is available.
cfmakeraw (which was previously used) in glibc also sets these values
explicitly, so it should be done in the Linux version of MakeRaw as well
to be consistent.

Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
Upstream-commit: 8a3730d251f844a55244d42c2dae0af8904e07c1
Component: engine
2017-08-03 13:21:42 +02:00
d659edcaf5 Update logrus to v1.0.1
Fixes case sensitivity issue

Signed-off-by: Derek McGowan <derek@mcgstyle.net>
Upstream-commit: 1009e6a40b295187e038b67e184e9c0384d95538
Component: engine
2017-07-31 13:16:46 -07:00
1861ca6314 Merge pull request #33987 from dnephin/cleanup-more-hack
Move test-unit out of hack/make
Upstream-commit: f8c434366e9134a1e2d4c4038e0257952f74cc99
Component: engine
2017-07-27 00:29:13 +02:00
189240deb3 Remove test-unit from hack/make
Also remove the test flag from pkg/term and jsut checkuid directly.
Fixed a problem with a pkg/term test that was leaving the terminal in a bad
state.

Signed-off-by: Daniel Nephin <dnephin@docker.com>
Upstream-commit: 1fb615599a83f41b449529df24f7e833c727e0ed
Component: engine
2017-07-17 11:39:33 -04:00
62a7e56d34 [pkg/term] use IoctlGetTermios/IoctlSetTermios from x/sys/unix
Use IoctlGetTermios/IoctlSetTermios from golang.org/x/sys/unix instead
of manually reimplementing them.

Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
Upstream-commit: 6476504695284fcdc32b5f7621cffca22746e67d
Component: engine
2017-07-17 10:37:42 +02:00
ea0a9a0e13 [pkg/term] temporarily use STD_*_HANDLE from syscall again
Due to the CL https://go-review.googlesource.com/c/39608/ in
x/sys/windows which changed the definitions of STD_INPUT_HANDLE,
STD_OUTPUT_HANDLE and STD_ERROR_HANDLE, we get the following failure
after re-vendoring x/sys/windows:

  07:47:01 # github.com/docker/docker/pkg/term
  07:47:01 pkg/term/term_windows.go:82: constant 4294967286 overflows int
  07:47:01 pkg/term/term_windows.go:88: constant 4294967285 overflows int
  07:47:01 pkg/term/term_windows.go:94: constant 4294967284 overflows int
  07:47:12 Build step 'Execute shell' marked build as failure

Temporarily switch back pkg/term to use these constants from the syscall
package and add a comment about it.

To really fix this, go-ansiterm should probably be switched to use
x/sys/windows.

Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
Upstream-commit: ef5252fc5dcd83d1b8dfe173a68691c8a63e7e4a
Component: engine
2017-07-12 14:52:42 +02:00
8a1bab985d Merge pull request #33520 from naveed-jamil-tenpearls/pkg/term
Add test coverage to pkg/term
Upstream-commit: e57f8a78ae3291670c903784864d04139c821ea1
Component: engine
2017-06-08 13:41:49 -07:00
fef5c78683 Add test coverage to pkg/term/proxy.go
Signed-off-by: Naveed Jamil <naveed.jamil@tenpearls.com>
Upstream-commit: a267248b5af9e58f878b0e2ba604c7256d637be2
Component: engine
2017-06-08 12:48:33 +05:00
f3ef17e47d Revert ONCLR and OPOST changes
This reverts to a version of runc without the ONCLR cleared to not cause
a regression with different clients using --tty.

This also reverts the OPOST changes to the term package to support the
initial change.

Signed-off-by: Michael Crosby <crosbymichael@gmail.com>
Upstream-commit: a5e83836a49547b2add871bb52cbd8bfedb57114
Component: engine
2017-06-07 13:14:52 -07:00
899cb8ee5f Set OPOST on bsd
Signed-off-by: Michael Crosby <crosbymichael@gmail.com>
Upstream-commit: 17ec46a24316f59c808c112e3ca46d7c442a785a
Component: engine
2017-06-02 12:53:49 -07:00
f074fcfdd0 [pkg/term] switch more syscalls to /x/sys/
Switches the remaining syscalls except Errno to /x/sys/.
This was supposed to be part of 33180

Signed-off-by: Christopher Jones <tophj@linux.vnet.ibm.com>
Upstream-commit: df6dfcf198a769e7f411736e1abb93e1aabb2698
Component: engine
2017-05-18 09:02:42 -04:00
934384aeb2 Merge pull request #33180 from tophj-ibm/switch-pkg-term-syscalls-to-x/sys
[pkg/term] refactor and switch syscall to x/sys
Upstream-commit: 6f6ee6fd04b9a1ac91f24631cdea9453e9fd35f7
Component: engine
2017-05-17 07:41:18 -07:00
fa44d02011 Update ContainerWait API
This patch adds the untilRemoved option to the ContainerWait API which
allows the client to wait until the container is not only exited but
also removed.

This patch also adds some more CLI integration tests for waiting for a
created container and waiting with the new --until-removed flag.

Docker-DCO-1.1-Signed-off-by: Josh Hawn <josh.hawn@docker.com> (github: jlhawn)

Handle detach sequence in CLI

Docker-DCO-1.1-Signed-off-by: Josh Hawn <josh.hawn@docker.com> (github: jlhawn)

Update Container Wait Conditions

Docker-DCO-1.1-Signed-off-by: Josh Hawn <josh.hawn@docker.com> (github: jlhawn)

Apply container wait changes to API 1.30

The set of changes to the containerWait API missed the cut for the
Docker 17.05 release (API version 1.29). This patch bumps the version
checks to use 1.30 instead.

This patch also makes a minor update to a testfile which was added to
the builder/dockerfile package.

Docker-DCO-1.1-Signed-off-by: Josh Hawn <josh.hawn@docker.com> (github: jlhawn)

Remove wait changes from CLI

Docker-DCO-1.1-Signed-off-by: Josh Hawn <josh.hawn@docker.com> (github: jlhawn)

Address minor nits on wait changes

- Changed the name of the tty Proxy wrapper to `escapeProxy`
- Removed the unnecessary Error() method on container.State
- Fixes a typo in comment (repeated word)

Docker-DCO-1.1-Signed-off-by: Josh Hawn <josh.hawn@docker.com> (github: jlhawn)

Use router.WithCancel in the containerWait handler

This handler previously added this functionality manually but now uses
the existing wrapper which does it for us.

Docker-DCO-1.1-Signed-off-by: Josh Hawn <josh.hawn@docker.com> (github: jlhawn)

Add WaitCondition constants to api/types/container

Docker-DCO-1.1-Signed-off-by: Josh Hawn <josh.hawn@docker.com> (github: jlhawn)

Address more ContainerWait review comments

- Update ContainerWait backend interface to not return pointer values
  for container.StateStatus type.
- Updated container state's Wait() method comments to clarify that a
  context MUST be used for cancelling the request, setting timeouts,
  and to avoid goroutine leaks.
- Removed unnecessary buffering when making channels in the client's
  ContainerWait methods.
- Renamed result and error channels in client's ContainerWait methods
  to clarify that only a single result or error value would be sent
  on the channel.

Docker-DCO-1.1-Signed-off-by: Josh Hawn <josh.hawn@docker.com> (github: jlhawn)

Move container.WaitCondition type to separate file

... to avoid conflict with swagger-generated code for API response

Docker-DCO-1.1-Signed-off-by: Josh Hawn <josh.hawn@docker.com> (github: jlhawn)

Address more ContainerWait review comments

Docker-DCO-1.1-Signed-off-by: Josh Hawn <josh.hawn@docker.com> (github: jlhawn)
Upstream-commit: 4921171587c09d0fcd8086a62a25813332f44112
Component: engine
2017-05-16 15:11:39 -07:00
474b9fb5b6 Rename term to winsize, tc_other to tc
Signed-off-by: Christopher Jones <tophj@linux.vnet.ibm.com>
Upstream-commit: 1c94c264c489e1d5fdae7f41120574e0322ab31d
Component: engine
2017-05-16 11:46:17 -04:00
b0891a48c7 [pkg/term] Refactor BSD-specific files
Signed-off-by: Tibor Vass <tibor@docker.com>
Upstream-commit: f8416e82d9152c7f833b9ea6ccb29cb221e14c16
Component: engine
2017-05-16 10:12:33 -04:00
b94eb3ae57 [pkg/term] switch syscall to x/sys
Switches calls to syscall to x/sys, which is more up to date.
This is fixes a number of possible bugs on other architectures
where ioctl tcget and tcset aren't implemented correctly.

There are a few remaining syscall references, because x/sys doesn't
have an Errno implementation yet.

Also removes a ppc64le and cgo build tag that fixes building on
ppc64le without cgo

Signed-off-by: Christopher Jones <tophj@linux.vnet.ibm.com>
Upstream-commit: f30b072b8157599cdd996b86d022117d2d55d1ce
Component: engine
2017-05-15 18:34:41 -04:00
8a31debf44 Add OPOST back to !cgo build for pkg/term
Signed-off-by: Michael Crosby <crosbymichael@gmail.com>
Upstream-commit: 270a33b666ff9a1b3925c5cf53c336b6fab20dc3
Component: engine
2017-05-09 16:36:17 -07:00
53d1a4eb83 Merge pull request #33007 from crosbymichael/containerd-rc5
Update moby to containerd and runc 1.0 final rc
Upstream-commit: 7238cca42c3d024adfa030306ad3e3ec4232baed
Component: engine
2017-05-08 09:23:07 -07:00
ce61a3d4f2 Update moby to runc and oci 1.0 runtime final rc
Signed-off-by: Michael Crosby <crosbymichael@gmail.com>
Upstream-commit: 005506d36c1c9308a05592d7596f3d484359c426
Component: engine
2017-05-05 13:45:45 -07:00
400bf9fc6d Prevent ppc64le to build pkg/term without cgo
Signed-off-by: Tibor Vass <tibor@docker.com>
Upstream-commit: 71e9f5c520bd457508994b11938b7a6c577beaaf
Component: engine
2017-05-05 12:14:30 -07:00
2db1bd6f28 fix typo
fix typo I found AMAP in integration-cli/*

fix typo mentioned by Allencloud

Signed-off-by: Aaron.L.Xu <likexu@harmonycloud.cn>
Upstream-commit: 40af5691648c5b9d07b1231e3ed3be29fd66521a
Component: engine
2017-01-19 15:52:28 +08:00
4c8ed1c0c8 Windows: Fix crash in docker system prune
Signed-off-by: John Howard <jhoward@microsoft.com>
Upstream-commit: e5900ee9bf0071c6a3ebaf813f82d5345c25d8f0
Component: engine
2016-12-09 14:23:25 -08:00
28a6abec82 error strings should not be capitalized or end with punctuation
Signed-off-by: yupeng <yu.peng36@zte.com.cn>
Upstream-commit: fc11efa2dbf72bb493a24650860220a2d4b07c5e
Component: engine
2016-11-22 14:53:11 +08:00
afe0671bd1 Force input stream ANSI emulation for ConsoleZ
This performs a similar check to the `"ConEmuANSI"` check that was recently
added to enable arrow keys navigation in docker container terminals.

Signed-off-by: Josh Wilson <josh.wilson@fivestars.com>
Upstream-commit: c0a5772668c5a2cb6d17a6b5907fc3eb08d18cc7
Component: engine
2016-10-05 12:42:48 -07:00
5c0c4a4b23 Merge pull request #25578 from rwilliams/conemu
Force input stream ANSI emulation for ConEmu.
Upstream-commit: 28d18b8205c813e18af96f0eb88850b2734077f4
Component: engine
2016-09-08 11:12:33 -04:00
753df65f71 Force input stream ANSI emulation for ConEmu.
Signed-off-by: Ron Williams <ron.a.williams@gmail.com>
Upstream-commit: 0fd4bbda2dfb9a1bfc6781f2a3dacedc62c7c11b
Component: engine
2016-08-10 11:24:12 -07:00
ba822f35dd make more pkgs support darwin
Signed-off-by: allencloud <allen.sun@daocloud.io>
Upstream-commit: bd11a269bc114334cf6160ba38e396f8f0e3aecd
Component: engine
2016-08-10 22:56:05 +08:00
a8be04ca52 added functionality to interrupt the terminal when it is waiting for an input
Signed-off-by: Avi Vaid <avaid1996@gmail.com>
Upstream-commit: c4b07f468388af6483913762d6ce6ae2ac9edf97
Component: engine
2016-08-04 10:00:02 -07:00
aaeaca1829 Windows: Restore console mode on set mode failure
SetConsoleMode() on input handles appears to remember invalid bits that
were set, causing problems for other programs (such as xcopy.exe) trying
to set the console mode after docker.exe has exited. Always restore
the input console mode on set failure.

Signed-off-by: John Starks <jostarks@microsoft.com>
Upstream-commit: 83c186fdd4332b8a08db715e8cb5dd1e80a56567
Component: engine
2016-07-22 18:34:15 -07:00
f8672a967c Windows: Always enable VT emulation
Always enable VT output emulation when starting the process so that
non-attaching commands can still output VT codes.

Also remove the version block for using the native console and just rely
on supported flags being present.

Signed-off-by: John Starks <jostarks@microsoft.com>
Upstream-commit: 4acc2c7499425b9c2521977019d9fe4da73e6af8
Component: engine
2016-06-23 13:14:39 -07:00
3f005ffe52 Windows: run -it not crash in ISE
Signed-off-by: John Howard <jhoward@microsoft.com>
Upstream-commit: 486a1a03d86a679740d79c2ef5e2a9574342f8c3
Component: engine
2016-05-25 09:50:18 -07:00
c308e5c791 Windows: Turn on native console by default
Signed-off-by: John Howard <jhoward@microsoft.com>
Upstream-commit: c152dc48e51630c37825a3488edf1885311483c8
Component: engine
2016-05-20 19:19:26 -07:00
db3db29c9f Windows: revendor Azure/go-ansiterm
go-ansiterm was previously pulling the testing package into the docker
binaries.

Signed-off-by: John Starks <jostarks@microsoft.com>
Upstream-commit: fab67ab677e14c908f879e362f8805c8e91570c6
Component: engine
2016-04-25 15:57:59 -07:00
45616510e1 Get pkg/term to build for Solaris
Signed-off-by: Amit Krishnan <krish.amit@gmail.com>
Upstream-commit: b216dc9115ebc0b803551ff761f5464fcbde09e1
Component: engine
2016-04-15 14:18:26 -07:00
f4871ac76e Fix panic on winsize syscall
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
Upstream-commit: 4d4ef98326f0b21bbb661321499e200a1412bc64
Component: engine
2016-04-13 17:08:00 -07:00
9f10b4351a Windows: Remove TP4 support from main code
Signed-off-by: John Howard <jhoward@microsoft.com>
Upstream-commit: 331c8a86d489e573fcbf1df3c4f813bbc3168624
Component: engine
2016-04-06 12:12:20 -07:00
5c35f01162 Merge pull request #21272 from Microsoft/jstarks/manifest_updates
Add os_version and os_features to Image
Upstream-commit: fc9912fd00f5e12a6f0904f3c758275724ba3318
Component: engine
2016-04-05 16:16:25 -07:00
4815437b5f Add os_version and os_features to Image
These fields are needed to specify the exact version of Windows that an
image can run on. They may be useful for other platforms in the future.

This also changes image.store.Create to validate that the loaded image is
supported on the current machine. This change affects Linux as well, since
it now validates the architecture and OS fields.

Signed-off-by: John Starks <jostarks@microsoft.com>
Upstream-commit: 194eaa5c0f843257e66b68bd735786308a9d93b2
Component: engine
2016-04-04 13:14:57 -07:00
7c3f3d665e pkg: cleanup some unused code
Signed-off-by: Alexander Morozov <lk4d4@docker.com>
Upstream-commit: 07b568cb5342789839aabba0ee6d41e7275099e8
Component: engine
2016-03-31 11:39:59 -07:00
3ff2e53880 Windows: Native console disableNewlineAutoReturn
Signed-off-by: John Howard <jhoward@microsoft.com>
Upstream-commit: c162cdb15fb08786c85d76fb438f003e72857f5c
Component: engine
2016-03-24 15:37:47 -07:00
8d2c6b65a8 Cli binary can now be build on OpenBSD
Signed-off-by: Frank Groeneveld <frank@frankgroeneveld.nl>
Upstream-commit: 719a43ca3530c424c3875d8c066f7ab09195dfdc
Component: engine
2016-03-18 14:56:21 +01:00