docker / app

Make your Docker Compose applications reusable, and share them on Docker Hub
Apache License 2.0
1.57k stars 177 forks source link

Bundle installation error from the private registry #566

Closed johnbizokk closed 5 years ago

johnbizokk commented 5 years ago

Description

On the previous week, we tried to migrate to the latest docker app release, but unfortunately, we face a lot of problems. In all the new versions, there is a degradation of product functionality from our perspective (we tried v0.8.0-beta1, v0.8.0-beta2, and also builds from the master branch).

The main problems came from the private registry side - with the latest release we are unable to install docker app bundles from the private Docker registry. We tried to use different (registry:2.7.1 or registry:2.7.0 or distribution/registry:v2.7.0) Docker registry images - but have no success. Also, if we tried to install the bundle locally - all have been working, but from our point of view - the primary bundle purpose has been lost.

Steps to reproduce the issue:

  1. Have the valid docker app bundle definition
  2. Run the command docker-app-linux bundle -t private_registry_fqdn/namespace/repo:tag
  3. Run the command docker push private_registry_fqdn/namespace/repo:tag
  4. Run the command docker-app-linux install private_registry_fqdn/namespace/repo:tag

Describe the results you received:

Unfortunately, we've got the following error: Error: private_registry_fqdn/namespace/repo:tag: invalid media type "application/vnd.docker.distribution.manifest.v2+json" for bundle manifest

Describe the results you expected:

We expected from docker app binary correct bundle installation from the private Docker registry (registry:2.7.1).

Output of docker version:

Client:
 Version:           18.09.7
 API version:       1.39
 Go version:        go1.10.8
 Git commit:        2d0083d
 Built:             Thu Jun 27 17:56:06 2019
 OS/Arch:           linux/amd64
 Experimental:      false

Server: Docker Engine - Community
 Engine:
  Version:          18.09.7
  API version:      1.39 (minimum version 1.12)
  Go version:       go1.10.8
  Git commit:       2d0083d
  Built:            Thu Jun 27 17:26:28 2019
  OS/Arch:          linux/amd64
  Experimental:     true

Output of docker-app version:

Version:               v0.8.0
Git commit:            7eea32b7
Built:                 Tue Jun 11 20:53:26 2019
OS/Arch:               linux/amd64
Experimental:          off
Renderers:             none
Invocation Base Image: docker/cnab-app-base:v0.8.0

Output of docker info:

Containers: X
 Running: X
 Paused: X
 Stopped: X
Images: X
Server Version: 18.09.7
Storage Driver: overlay2
 Backing Filesystem: xfs
 Supports d_type: true
 Native Overlay Diff: true
Logging Driver: local
Cgroup Driver: cgroupfs
Plugins:
 Volume: local
 Network: bridge host ipvlan macvlan null overlay
 Log: awslogs fluentd gcplogs gelf journald json-file local logentries splunk syslog
Swarm: active
 NodeID: ID
 Is Manager: true
 ClusterID: ID
 Managers: X
 Nodes: X
 Default Address Pool: 10.0.0.0/8
 SubnetSize: 24
 Orchestration:
  Task History Retention Limit: 5
 Raft:
  Snapshot Interval: 10000
  Number of Old Snapshots to Retain: 0
  Heartbeat Tick: 1
  Election Tick: 10
 Dispatcher:
  Heartbeat Period: 5 seconds
 CA Configuration:
  Expiry Duration: 3 months
  Force Rotate: 0
 Autolock Managers: false
 Root Rotation In Progress: false
 Node Address:  IPADDR
 Manager Addresses:
 IPADDR
Runtimes: runc
Default Runtime: runc
Init Binary: docker-init
containerd version: 894b81a4b802e4eb2a91d1ce216b8817763c29fb
runc version: 425e105d5a03fabd737a126ad93d62a9eeede87f
init version: fec3683
Security Options:
 seccomp
  Profile: default
Kernel Version: 3.10.0-957.21.3.el7.x86_64
Operating System: CentOS Linux 7 (Core)
OSType: linux
Architecture: x86_64
CPUs: 8
Total Memory: 55.86GiB
Name: hostname
ID: ID
Docker Root Dir: /var/lib/docker
Debug Mode (client): false
Debug Mode (server): false
Registry: https://index.docker.io/v1/
Experimental: true
Insecure Registries:
 127.0.0.0/8
Registry Mirrors:
 http://localhost:6000/
Live Restore Enabled: false
Product License: Community Engine

Additional environment details:

We are using the self-hosted private Docker registry with basic auth.

silvin-lubecki commented 5 years ago

Hello @johnbizokk thank you for filling this issue. That's a weird behavior you have here, as we have integration tests against private registry. We have to reproduce this bug and then maybe ask you more context.

silvin-lubecki commented 5 years ago

@johnbizokk just re-read your issue, trying to reproduce it. I see that step 3 you are pushing the bundle using docker push instead of docker-app-linux push. Can you try with this command and check there is no error?

johnbizokk commented 5 years ago

@silvin-lubecki Sorry for the long response. With the command, that you provided in the previous message - the application bundle successfully pushed the private registry and can be installed without any problems. The only thing that I have got is the warning in the stdout - WARN[0014] reference for unknown type: application/vnd.cnab.config.v1+json and the followed success message - Successfully pushed bundle to private_registry_fqdn/namespace/repo:tag. Digest is sha256:SHA. Also, can you clarify this behavior? Is it desired? As I know - in 19.03 docker app installation will be available as a plugin and can be invoked as docker app command. From my perspective - it can be little confusing for users to run a separate command via CLI - I suggest that the use necessity the following commands could bring users to the confusion - docker push and docker app push.

silvin-lubecki commented 5 years ago

Hello @johnbizokk , this warning has been removed lastly with this PR #569 About the docker push and docker app push we totally understand your concern. We are figuring how we can offer the best UX, that may take time as it is a difficult matter. Thank you for you feedback by the way 👍 I will now close this issue, feel free to open a new one about the push UX issue if you want to 👍