summaryrefslogtreecommitdiff
path: root/vendor/github.com/fsouza/go-dockerclient/container_commit.go
diff options
context:
space:
mode:
Diffstat (limited to 'vendor/github.com/fsouza/go-dockerclient/container_commit.go')
-rw-r--r--vendor/github.com/fsouza/go-dockerclient/container_commit.go4
1 files changed, 3 insertions, 1 deletions
diff --git a/vendor/github.com/fsouza/go-dockerclient/container_commit.go b/vendor/github.com/fsouza/go-dockerclient/container_commit.go
index d8551626b..902ba6455 100644
--- a/vendor/github.com/fsouza/go-dockerclient/container_commit.go
+++ b/vendor/github.com/fsouza/go-dockerclient/container_commit.go
@@ -3,6 +3,7 @@ package docker
import (
"context"
"encoding/json"
+ "errors"
"net/http"
)
@@ -30,7 +31,8 @@ func (c *Client) CommitContainer(opts CommitContainerOptions) (*Image, error) {
context: opts.Context,
})
if err != nil {
- if e, ok := err.(*Error); ok && e.Status == http.StatusNotFound {
+ var e *Error
+ if errors.As(err, &e) && e.Status == http.StatusNotFound {
return nil, &NoSuchContainer{ID: opts.Container}
}
return nil, err