Skip to content
This repository has been archived by the owner on Aug 14, 2020. It is now read-only.

environment variable does not have valid identifier #244

Open
dohnto opened this issue Feb 27, 2017 · 1 comment
Open

environment variable does not have valid identifier #244

dohnto opened this issue Feb 27, 2017 · 1 comment

Comments

@dohnto
Copy link

dohnto commented Feb 27, 2017

Hello, I have encountered a edge-case where docker image cannot be converted to aci:

# docker2aci --version
docker2aci version 9cec4de
appc version 0.8.10

Docker image was created using following Dockerfile:

FROM busybox
ENV A-B=10

I have push the image to dohnto/docker2aci-env:1.0 for maintainers to verify the bug.

# ./docker2aci docker://dohnto/docker2aci-env:1.0
Downloading sha256:fdab1243926 [===============================] 670 KB / 670 KB
Error: conversion error: error generating ACI: error writing manifest: json: error calling MarshalJSON for type schema.ImageManifest: json: error calling MarshalJSON for type *types.App: environment variable does not have valid identifier "A-B"

Expected result: don't fail :)

@lucab
Copy link
Contributor

lucab commented Feb 28, 2017

The problem is that such an environment name is outside of POSIX portable set, and appc tries to stick to it. See rkt/rkt#3532 (comment) for more details.

ae6rt added a commit to ae6rt/spec that referenced this issue Jul 16, 2017
Files touched:  schema/types/environment.go, schema/types/environment_test.go

Allow additional characters in the set considered valid in environment variable names.  Prompted by
appc/docker2aci#244 and rkt/rkt#3532.
ae6rt added a commit to ae6rt/spec that referenced this issue Jul 17, 2017
Files touched:  schema/types/environment.go, schema/types/environment_test.go, spec/aci.md

Allow additional characters in the set considered valid in environment variable names.  Prompted by
appc/docker2aci#244 and rkt/rkt#3532.
indradhanush pushed a commit to kinvolk-archives/appc-spec that referenced this issue Jan 24, 2018
Files touched:  schema/types/environment.go, schema/types/environment_test.go, spec/aci.md

Allow additional characters in the set considered valid in environment variable names.  Prompted by
appc/docker2aci#244 and rkt/rkt#3532.
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants