Commit e42eb8db authored by Philippe Pepiot's avatar Philippe Pepiot
Browse files

Allow to modify CW_INSTANCE on onbuild images

By using a build argument CW_INSTANCE_NAME. The build argument cannot be set to
CW_INSTANCE because when running "ENV CW_INSTANCE=$CW_INSTANCE" docker lookup
the environment first before build arguments.
parent 1312dc15f13d
ARG FROM ARG FROM
FROM $FROM FROM $FROM
ONBUILD ARG CW_INSTANCE_NAME=instance
ONBUILD ENV CW_INSTANCE=$CW_INSTANCE_NAME
ONBUILD USER root ONBUILD USER root
ONBUILD COPY . /src/ ONBUILD COPY . /src/
ONBUILD RUN pip install -e /src ONBUILD RUN pip install -e /src
......
...@@ -60,7 +60,8 @@ The image has some expectations: ...@@ -60,7 +60,8 @@ The image has some expectations:
* The default instance name is "instance" and its configuration directory is in * The default instance name is "instance" and its configuration directory is in
/etc/cubicweb.d/instance, this can be changed with the ``CW_INSTANCE`` /etc/cubicweb.d/instance, this can be changed with the ``CW_INSTANCE``
environment variable. Although you shouldn't need to modify this. environment variable or via the ``CW_INSTANCE_NAME`` build argument for
``onbuild`` images. Although you shouldn't need to modify this.
How to build an image for a cubicweb application ? How to build an image for a cubicweb application ?
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment