1
0
mirror of https://github.com/bingohuang/docker-labs.git synced 2025-10-05 18:03:21 +08:00

Use docker 1.13 to allow overlay networks

- Print error if resizing fails
This commit is contained in:
Marcos Lilljedahl
2016-11-13 01:09:29 -03:00
parent b37f2469c8
commit 54378862b3
5 changed files with 19 additions and 9 deletions

View File

@@ -39,11 +39,10 @@ func getDindImageName() string {
func NewInstance(session *Session) (*Instance, error) {
log.Printf("NewInstance - using image: [%s]\n", dindImage)
instance, err := CreateInstance(session.Id, dindImage)
instance.Session = session
if err != nil {
return nil, err
}
instance.Session = session
if session.Instances == nil {
session.Instances = make(map[string]*Instance)
@@ -66,8 +65,8 @@ func (s *sessionWriter) Write(p []byte) (n int, err error) {
return len(p), nil
}
func (i *Instance) ResizeTerminal(cols, rows uint) {
ResizeExecConnection(i.ExecId, i.Ctx, cols, rows)
func (i *Instance) ResizeTerminal(cols, rows uint) error {
return ResizeExecConnection(i.ExecId, i.Ctx, cols, rows)
}
func (i *Instance) Exec() {