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

Default single file dockerapp is unable to be used with UCP #429

Closed stevenfollis closed 5 years ago

stevenfollis commented 5 years ago

Description

The single file generated by docker-app uses two - characters to separate sections:

$ docker-app init -s foo
...
$ cat foo.dockerapp

# This section contains your application metadata.
# Version of the application
version: 0.1.0
# Name of the application
name: foo
# A short description of the application
description:
# Namespace to use when pushing to a registry. This is typically your Hub username.
#namespace: myHubUsername
# List of application maitainers with name and email for each
maintainers:
  - name: steven
    email:
# Specify false here if your application doesn't support Swarm or Kubernetes
targets:
  swarm: true
  kubernetes: true

--
# This section contains the Compose file that describes your application services.
version: "3.6"
services: {}

--
# This section contains the default values for your application settings.

However, the instructions for deploying that bundle in UCP want three - characters to separate sections:

  Single-file format: Defined by metadata.yml, docker-compose.yml, and settings.yml concatenated in that order and separated by ---\n in a single file named named my-app.dockerapp.

When I take my foo.dockerapp file and deploy in UCP it errors for me:

image

Steps to reproduce the issue:

  1. docker-app init -s foo
  2. Copy/paste into UCP -> Stacks -> Create Stack -> App Package

Additional information you deem important (e.g. issue happens only occasionally):

Adjusting the starter template to have --- as separators looks like it would correct the issue; are two characters being used for a specific reason? If so can take it up with the UCP team.

Output of docker version:

Client: Docker Engine - Community
 Version:           18.09.0
 API version:       1.39
 Go version:        go1.10.4
 Git commit:        4d60db4
 Built:             Wed Nov  7 00:47:43 2018
 OS/Arch:           darwin/amd64
 Experimental:      true

Server: Docker Engine - Community
 Engine:
  Version:          18.09.0
  API version:      1.39 (minimum version 1.12)
  Go version:       go1.10.4
  Git commit:       4d60db4
  Built:            Wed Nov  7 00:55:00 2018
  OS/Arch:          linux/amd64
  Experimental:     true

Output of docker-app version:

Version:      v0.2.0
Git commit:   854872f
Build time:   2018-06-11T15:06:17.093522032+00:00
OS/Arch:      darwin/amd64
Experimental: off
Renderers:    none

Output of docker info:

Containers: 18
 Running: 18
 Paused: 0
 Stopped: 0
Images: 632
Server Version: 18.09.0
Storage Driver: overlay2
 Backing Filesystem: extfs
 Supports d_type: true
 Native Overlay Diff: true
Logging Driver: json-file
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: 0m2x7ka5igahjs937cpllsvvx
 Is Manager: true
 ClusterID: ds6ckqccsdu328dqbiitocm6l
 Managers: 1
 Nodes: 1
 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: 192.168.65.3
 Manager Addresses:
  192.168.65.3:2377
Runtimes: runc
Default Runtime: runc
Init Binary: docker-init
containerd version: 468a545b9edcd5932818eb9de8e72413e616e86e
runc version: 69663f0bd4b60df09991c08812a60108003fa340
init version: fec3683
Security Options:
 seccomp
  Profile: default
Kernel Version: 4.9.125-linuxkit
Operating System: Docker for Mac
OSType: linux
Architecture: x86_64
CPUs: 2
Total Memory: 7.787GiB
Name: linuxkit-025000000001
ID: ZFSP:NOZP:YSWU:M5GK:2TG4:TTED:QBWG:7IZY:4RB3:XNOX:QLUP:UF4E
Docker Root Dir: /var/lib/docker
Debug Mode (client): false
Debug Mode (server): true
 File Descriptors: 137
 Goroutines: 241
 System Time: 2018-12-10T09:56:17.6165353Z
 EventsListeners: 2
HTTP Proxy: gateway.docker.internal:3128
HTTPS Proxy: gateway.docker.internal:3129
Registry: https://index.docker.io/v1/
Labels:
Experimental: true
Insecure Registries:
 harbor.ishmael.in
 127.0.0.0/8
Live Restore Enabled: false
Product License: Community Engine
silvin-lubecki commented 5 years ago

Hi @stevenfollis, thank you for filling this issue. This has already been fixed by this commit. I can see you are using the v0.2.0 version of docker-app, can you update to the last v0.6.0 release?

stevenfollis commented 5 years ago

DOH! Yes, v0.6.0 clears it right up - my bad for not updating!