¿Cómo pasar argumentos a un Dockerfile?
Estoy usando la instrucción RUN dentro de un Dockerfile
para instalar un rpm
RUN yum -y install samplerpm-2.3
Sin embargo, quiero pasar el valor "2.3" como argumento. Mi instrucción RUN debería ser algo así como:
RUN yum -y install samplerpm-$arg
Donde $arg=2.3
66
1 answers
Está buscando --build-arg
y la instrucción ARG
. Estos son nuevos a partir de Docker 1.9. Echa un vistazo https://docs.docker.com/engine/reference/builder/#arg . Esto le permitirá agregar ARG arg
a Dockerfile
y luego construir con docker build --build-arg arg=2.3 .
.
81
Author: Andy Shinn,
Warning: date(): Invalid date.timezone value 'Europe/Kyiv', we selected the timezone 'UTC' for now. in /var/www/agent_stack/data/www/ajaxhispano.com/template/agent.layouts/content.php on line 61
2015-12-13 18:28:41
Warning: date(): Invalid date.timezone value 'Europe/Kyiv', we selected the timezone 'UTC' for now. in /var/www/agent_stack/data/www/ajaxhispano.com/template/agent.layouts/content.php on line 61
2015-12-13 18:28:41