On Thu, 2015-04-30 at 23:18 +0200, Václav Pavlín wrote:
> Hello,
>
> I wanted to use CentOS Atomic Host and Docker images to package
> atomicapp-run [1] into an image but I ran into troubles with docker and
> docker-py (probably).
>
> See http://fpaste.org/217373/30426738/
>
> There is f.e. ${CONFDIR} specified in LABEL INSTALL, but it disappears
> during docker build. I "fixed" this with adding a backslash in front of
> dollar sign (\${CONFDIR}) so it persisted after the build. But when I ran
>
> atomic install vpavlin/atomicapp-run
>
> I got this incorrect cmd again:
>
> docker run --rm -it --privileged -v /run:/run -v :/atomicapp -v /:/host
> -v /answers.conf:/application-entity/answers.conf -e
> IMAGE=vpavlin/wp-app -e NAME=wp-app --name wp-app vpavlin/wp-app
> containerapp -v install --update --path /atomicapp /application-entity
>
> This works completely fine on RHELAH, but there is a different docker
> verison:
>
> RHELAH:
> bash-4.2# docker --version
> Docker version 1.5.0-dev, build fc0329b/1.5.0
>
> CentOS AH:
> bash-4.2# docker --version
> Docker version 1.6.0, build bdbc177
>
> So my guess it that docker somehow ignores/evaluates variables in LABELS
> in 1.6.0...and even if they persist with the backslash fix, they get
> lost by inspect() from docker-py used in atomic tool.
>
> Any thoughts if this is intended or how to fix it/workaround it?
>
> Thanks,
> Vašek
>
>
> [1] https://github.com/vpavlin/atomicapp-run/blob/master/Dockerfile.centos
>
The patch by Dan was slightly altered before it went live:
https://github.com/docker/docker/commit/6784a772baaa20936f00b8adc00a4b4444356181
How does the inspect output look like after you've escaped the dollars?
--
Pavel Odvody <podvody redhat com>
Software Engineer - EMEA ENG Developer Experience
5EC1 95C1 8E08 5BD9 9BBF 9241 3AFA 3A66 024F F68D
Red Hat Czech s.r.o., Purkyňova 99/71, 612 45, Brno
Attachment:
signature.asc
Description: This is a digitally signed message part