Re: [Dev] PP - Docker best practices - ADD or COPY

2015-06-09 Thread Imesh Gunaratne
+1

On Tue, Jun 9, 2015 at 1:36 PM, Udara Liyanage  wrote:

> Hi,
>
> I had a look at Docker best practices
>  
> which
> recommend to use COPY instead of ADD unless it is a tar.
>
> "For other items (files, directories) that do not require ADD’s tar
> auto-extraction capability, you should always use COPY."
>
> With that we can improve WSO2 ESB cartridge by replacing ADD by COPY.
> Below are some sample places which can be replaced.
>
> ADD scripts/init.sh /usr/local/bin/init.sh
> ADD scripts/export-envs.sh /tmp/export-envs.sh
>
> ADD packages/${CONFIGURATOR_NAME}.zip /opt/
> ADD packages/wso2esb-${WSO2_ESB_VERSION}.zip /opt/
> ADD plugins /${PCA_HOME}/plugins
>
> WDYT?
>
>
> --
>
> Udara Liyanage
> Software Engineer
> WSO2, Inc.: http://wso2.com
> lean. enterprise. middleware
>
> web: http://udaraliyanage.wordpress.com
> phone: +94 71 443 6897
>



-- 
*Imesh Gunaratne*
Senior Technical Lead
WSO2 Inc: http://wso2.com
T: +94 11 214 5345 M: +94 77 374 2057
W: http://imesh.gunaratne.org
Lean . Enterprise . Middleware
___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev


Re: [Dev] PP - Docker best practices - ADD or COPY

2015-06-09 Thread Chamila De Alwis
+1

ADD can also get files from a specified URL. However, I haven't seen us
using that functionality as well.


Regards,
Chamila de Alwis
Committer and PMC Member - Apache Stratos
Software Engineer | WSO2 | +94772207163
Blog: code.chamiladealwis.com



On Tue, Jun 9, 2015 at 4:15 AM, Imesh Gunaratne  wrote:

> +1
>
> On Tue, Jun 9, 2015 at 1:36 PM, Udara Liyanage  wrote:
>
>> Hi,
>>
>> I had a look at Docker best practices
>> 
>>  which
>> recommend to use COPY instead of ADD unless it is a tar.
>>
>> "For other items (files, directories) that do not require ADD’s tar
>> auto-extraction capability, you should always use COPY."
>>
>> With that we can improve WSO2 ESB cartridge by replacing ADD by COPY.
>> Below are some sample places which can be replaced.
>>
>> ADD scripts/init.sh /usr/local/bin/init.sh
>> ADD scripts/export-envs.sh /tmp/export-envs.sh
>>
>> ADD packages/${CONFIGURATOR_NAME}.zip /opt/
>> ADD packages/wso2esb-${WSO2_ESB_VERSION}.zip /opt/
>> ADD plugins /${PCA_HOME}/plugins
>>
>> WDYT?
>>
>>
>> --
>>
>> Udara Liyanage
>> Software Engineer
>> WSO2, Inc.: http://wso2.com
>> lean. enterprise. middleware
>>
>> web: http://udaraliyanage.wordpress.com
>> phone: +94 71 443 6897
>>
>
>
>
> --
> *Imesh Gunaratne*
> Senior Technical Lead
> WSO2 Inc: http://wso2.com
> T: +94 11 214 5345 M: +94 77 374 2057
> W: http://imesh.gunaratne.org
> Lean . Enterprise . Middleware
>
>
___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev


Re: [Dev] PP - Docker best practices - ADD or COPY

2015-06-09 Thread Gayan Gunarathne
+1

But still I think we may need to use ADD for local tar file extraction and
downloading files from remote location.

Thanks,
Gayan


On Tue, Jun 9, 2015 at 5:06 PM, Chamila De Alwis  wrote:

> +1
>
> ADD can also get files from a specified URL. However, I haven't seen us
> using that functionality as well.
>
>
> Regards,
> Chamila de Alwis
> Committer and PMC Member - Apache Stratos
> Software Engineer | WSO2 | +94772207163
> Blog: code.chamiladealwis.com
>
>
>
> On Tue, Jun 9, 2015 at 4:15 AM, Imesh Gunaratne  wrote:
>
>> +1
>>
>> On Tue, Jun 9, 2015 at 1:36 PM, Udara Liyanage  wrote:
>>
>>> Hi,
>>>
>>> I had a look at Docker best practices
>>> 
>>>  which
>>> recommend to use COPY instead of ADD unless it is a tar.
>>>
>>> "For other items (files, directories) that do not require ADD’s tar
>>> auto-extraction capability, you should always use COPY."
>>>
>>> With that we can improve WSO2 ESB cartridge by replacing ADD by COPY.
>>> Below are some sample places which can be replaced.
>>>
>>> ADD scripts/init.sh /usr/local/bin/init.sh
>>> ADD scripts/export-envs.sh /tmp/export-envs.sh
>>>
>>> ADD packages/${CONFIGURATOR_NAME}.zip /opt/
>>> ADD packages/wso2esb-${WSO2_ESB_VERSION}.zip /opt/
>>> ADD plugins /${PCA_HOME}/plugins
>>>
>>> WDYT?
>>>
>>>
>>> --
>>>
>>> Udara Liyanage
>>> Software Engineer
>>> WSO2, Inc.: http://wso2.com
>>> lean. enterprise. middleware
>>>
>>> web: http://udaraliyanage.wordpress.com
>>> phone: +94 71 443 6897
>>>
>>
>>
>>
>> --
>> *Imesh Gunaratne*
>> Senior Technical Lead
>> WSO2 Inc: http://wso2.com
>> T: +94 11 214 5345 M: +94 77 374 2057
>> W: http://imesh.gunaratne.org
>> Lean . Enterprise . Middleware
>>
>>
>
> ___
> Dev mailing list
> Dev@wso2.org
> http://wso2.org/cgi-bin/mailman/listinfo/dev
>
>


-- 

Gayan Gunarathne
Technical Lead, WSO2 Inc. (http://wso2.com)
Committer & PMC Member, Apache Stratos
email : gay...@wso2.com  | mobile : +94 766819985
___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev