Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

dockerdist: Auth: err: open /etc/docker/certs.d/....: permission denied #116

Open
ccsalway opened this issue Mar 15, 2018 · 0 comments
Open

Comments

@ccsalway
Copy link

ccsalway commented Mar 15, 2018

I can't get clairctl to work due to some permission denied issue.

I'm using the following versions

Clairctl version 1.2.8

Docker Client:
 Version:	17.12.1-ce
 API version:	1.35
 Go version:	go1.9.4
 Git commit:	7390fc6
 Built:	Tue Feb 27 22:17:40 2018
 OS/Arch:	linux/amd64

Docker Server:
 Engine:
  Version:	17.12.1-ce
  API version:	1.35 (minimum version 1.12)
  Go version:	go1.9.4
  Git commit:	7390fc6
  Built:	Tue Feb 27 22:16:13 2018
  OS/Arch:	linux/amd64
  Experimental:	false

I first log in to AWS

aws ecr get-login --region eu-west-1 --no-include-email | bash

Login Succeeded

I can do a docker pull

docker pull **********.dkr.ecr.eu-west-1.amazonaws.com/gocd/base_image:20

20: Pulling from gocd/base_image
Digest: sha256:8582f418b157afc6b847f5b002f978647c1e7a4535f39a987fd53367c6cffa1e
Status: Image is up to date for **********.dkr.ecr.eu-west-1.amazonaws.com/gocd/base_image:20

The local clair is working

curl -v http://localhost:6060/v1/namespaces

*   Trying 127.0.0.1...
* Connected to localhost (127.0.0.1) port 6060 (#0)
> GET /v1/namespaces HTTP/1.1
> Host: localhost:6060
> User-Agent: curl/7.47.0
> Accept: */*
> 
< HTTP/1.1 200 OK
< Content-Type: application/json;charset=utf-8
< Server: clair
< Date: Thu, 15 Mar 2018 18:39:56 GMT
< Content-Length: 1239
< 
{"Namespaces":[{"Name":"debian:unstable","VersionFormat":"dpkg"},{"Name":"debian:7","VersionFormat":"dpkg"},{"Name":"debian:10","VersionFormat":"dpkg"},{"Name":"debian:9","VersionFormat":"dpkg"},{"Name":"debian:8","VersionFormat":"dpkg"},{"Name":"alpine:v3.7","VersionFormat":"dpkg"},{"Name":"alpine:v3.3","VersionFormat":"dpkg"},{"Name":"alpine:v3.4","VersionFormat":"dpkg"},{"Name":"alpine:v3.5","VersionFormat":"dpkg"},{"Name":"alpine:v3.6","VersionFormat":"dpkg"},{"Name":"ubuntu:17.10","VersionFormat":"dpkg"},{"Name":"ubuntu:12.04","VersionFormat":"dpkg"},{"Name":"ubuntu:17.04","VersionFormat":"dpkg"},{"Name":"ubuntu:16.04","VersionFormat":"dpkg"},{"Name":"ubuntu:14.04","VersionFormat":"dpkg"},{"Name":"ubuntu:15.04","VersionFormat":"dpkg"},{"Name":"ubuntu:15.10","VersionFormat":"dpkg"},{"Name":"ubuntu:13.04","VersionFormat":"dpkg"},{"Name":"ubuntu:12.10","VersionFormat":"dpkg"},{"Name":"ubuntu:16.10","VersionFormat":"dpkg"},{"Name":"ubuntu:14.10","VersionFormat":"dpkg"},{"Name":"oracle:7","VersionFormat":"rpm"},{"Name":"oracle:5","VersionFormat":"rpm"},{"Name":"oracle:6","VersionFormat":"rpm"},{"Name":"centos:5","VersionFormat":"rpm"},{"Name":"centos:6","VersionFormat":"rpm"},{"Name":"centos:7","VersionFormat":"rpm"}]}
* Connection #0 to host localhost left intact

But I cant push to clair using the image from the Amazon ECR

clairctl push **********.dkr.ecr.eu-west-1.amazonaws.com/gocd/base_image:20 --log-level debug

2018-03-15 18:35:36.209781 D | config: No config file used
2018-03-15 18:35:36.209933 D | dockerdist: Downloading manifest for *********.dkr.ecr.eu-west-1.amazonaws.com/gocd/base_image:20
2018-03-15 18:35:36.210042 D | dockerdist: Retrieving repository client
2018-03-15 18:35:36.211413 D | dockerdist: Auth: err: open /etc/docker/certs.d/********.dkr.ecr.eu-west-1.amazonaws.com: permission denied
client quit unexpectedly
2018-03-15 18:35:36.211434 C | cmd: retrieving manifest for "***********.dkr.ecr.eu-west-1.amazonaws.com/gocd/base_image:20": open /etc/docker/certs.d/*************.dkr.ecr.eu-west-1.amazonaws.com: permission denied

If I can do it with docker, why can't I do it with clairctl/clair?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant