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

CNAB bundle name must be lowercase? #711

Open EmbeddedAndroid opened 4 years ago

EmbeddedAndroid commented 4 years ago

Description

In the CNAB Identifying Metadata section it states that name MUST contain only characters from the Unicode graphic characters. and The Unicode graphic character set allowed for name includes letters, numbers, punctuation, symbols, and spaces; it does not include newlines or tabs.

However, I observed that docker-app is enforcing a requirement for the CNAB bundle name to be lowercase.

Steps to reproduce the issue:

Using the following docker-app definition:

version: 0.1.0
name: Ubuntu
description: Ubuntu 18.04 Container
---
version: '3.2'
services:
  ubuntu:
    image: ubuntu:18.04
    restart: always
    tty: true
---

Run docker-app render on the above file.

Describe the results you received:

When I attempted to render the above definition, I received this error:

Error: image name "Ubuntu:0.1.0-invoc" is invalid, please check name and version fields: invalid reference format: repository name must be lowercase

Describe the results you expected:

docker-app would render a docker-compose file.

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

Perhaps there is a good reason docker-app enforces this rule, but I'd like to understand why (so I can document it).

Output of docker version:

Docker version 19.03.2-ce, build 6a30dfca03

Output of docker app version:

docker-app version v0.8.0, build 7eea32b7

Output of docker info:

Client:
 Debug Mode: false

Server:
 Containers: 2
  Running: 2
  Paused: 0
  Stopped: 0
 Images: 11
 Server Version: 19.03.2-ce
 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: inactive
 Runtimes: runc
 Default Runtime: runc
 Init Binary: docker-init
 containerd version: fd103cb716352c7e19768e4fed057f71d68902a0.m
 runc version: 425e105d5a03fabd737a126ad93d62a9eeede87f-dirty
 init version: fec3683-dirty (expected: fec3683b971d9)
 Kernel Version: 5.0.21-lmp-standard
 Operating System: Linux-microPlatform 3.0-50
 OSType: linux
 Architecture: x86_64
 CPUs: 4
 Total Memory: 15.51GiB
 Name: intel-corei7-64
 ID: 7TRC:OKJZ:REIM:ROKL:RZH6:OJL5:DDHE:ML4B:G2CR:CEUD:T6VL:ATXV
 Docker Root Dir: /var/lib/docker
 Debug Mode: false
 Registry: https://index.docker.io/v1/
 Labels:
 Experimental: false
 Insecure Registries:
  127.0.0.0/8
 Live Restore Enabled: false
rumpl commented 4 years ago

@EmbeddedAndroid thanks for reporting this.

Docker App is not enforcing this but docker is, a docker image name cannot have uppercase letters.

When you run render we create the invocation image and run render inside it. We take the name of the image from the metadata (Ubuntu in your case), hence the error.

We'll take a look at this and figure out what we want to do in this case, the most straightforward thing to do would be to take the name of the application and make it compatible with docker.

EmbeddedAndroid commented 4 years ago

@rumpl Thanks for the explanation, now it makes sense to me.

I will document this behavior for our users so they don't stumble over this for now. Thanks for the great work on docker-apps!

P.S. We've added support to deliver docker-apps via theupdateframework on embedded devices. If you curious, we did some live demos on youtube here: https://www.youtube.com/watch?v=2k73RVpbjjw

rumpl commented 4 years ago

Awesome, thanks for sharing this! Would you be interested in a ~1h session with us so that we can show you what's coming in the future? Would love to have some feedback too.

EmbeddedAndroid commented 4 years ago

Awesome, thanks for sharing this! Would you be interested in a ~1h session with us so that we can show you what's coming in the future? Would love to have some feedback too.

No problem at all!

I would be very interested in having a session, would i be able to invite a few engineers my from team as well? Drop me an email at tyler@foundries.io and we can go from there!