Hi Pankaj,

One improvement you can do is, redirect the apache logs to standard out, so
that anyone can inspect the logs easily with docker logs --follow instead
of login in to the container and figuring out where are the logs. Usually
thats what people do with logging in docker.

Regards
Lahiru

On Wed, Jul 22, 2015 at 11:30 AM, Shameera Rathnayaka <
[email protected]> wrote:

> Hi Pankaj,
>
> I am suggesting the sort of a same thing in a different way, no issue +1
> for above approach it make sense.
>
> Thanks,
> Shameera.
>
> On Wed, Jul 22, 2015 at 12:47 PM Pankaj Saha <[email protected]>
> wrote:
>
>> Hi Shameera,
>>
>> Here is a bit of confusion.
>> The approach should be: when used down load the airavata source code, he
>> will get a Dockerfile(not image) with it. He can build his own docker image
>> out of it. He can make changes to source code of airavata php gateway and
>> make docker image out of it. So we have to keep a Docker file that way.
>>
>> If user really want to use official airavata PGA image, then he needs not
>> to build it locally he can directly download (for different release
>> versions) images, from dockerhub repository.
>>
>> I think Lahiru suggested me this approach long before, when I was not
>> very much aware of that docker build.
>>
>> Thanks
>> Pankaj
>>
>>
>>
>>
>>
>>
>>
>> On Wed, Jul 22, 2015 at 12:19 PM, Shameera Rathnayaka <
>> [email protected]> wrote:
>>
>>> Hi Pankaj,
>>>
>>> There are two types of docker images,
>>> 1. Released airavata docker images - Here we will directly download
>>> binary from one of apache mirror extract it and use. e.g.: after 0.15
>>> release we will have a docker images apache/airavata-<component>:0.15 .
>>> Released Dockerfiles are final, we won't change anything of that file. We
>>> can release these docker images and files with our release process. And add
>>> a link from docker registry. e.g.: see the ubuntu docker registry
>>> <https://registry.hub.docker.com/_/ubuntu/>
>>> 2. latest docker image:  This is an image of master code. latest
>>> Dockerfile will download master branch and build it and start server. This
>>> is the one we keep in our airavata master git branch.
>>>
>>> On Wed, Jul 22, 2015 at 11:29 AM Pankaj Saha <[email protected]>
>>> wrote:
>>>
>>>> we should not copy this from github.
>>>> Reason is user can have his local version of code and after making
>>>> changes he may wish to create a docker for his source code.
>>>>
>>>
>>> Whole point of releasing docker images is to make user life easier.
>>> Hence we assume user don't need to edit docker file. or source. if user
>>> need to create his/her own docker image then user can edit the original
>>> docker file and build it.
>>>
>>>
>>>> Dockerfile should stay in the root of the airavata-php-gateway source
>>>> code. If we download it from git for different version then user has to
>>>> change the Dockerfile every time, which is not expected.
>>>>
>>>
>>> We will release docker images for all released versions, so user need to
>>> use those files.
>>>
>>>
>>>>
>>>> What ever the local copy that user have, Docker file should be able to
>>>> create a docker image out of that.
>>>>
>>>
>>> If we really wan't this, then let's make an new docker file which do
>>> this instead the official latest or released docker files.
>>>
>>> Regards,
>>> Shameera.
>>>
>>>>
>>>> Thanks
>>>> Pankaj
>>>>
>>>>
>>>>
>>>> On Wed, Jul 22, 2015 at 11:21 AM, Shameera Rathnayaka <
>>>> [email protected]> wrote:
>>>>
>>>>> When ever it is possible, we should reduce number of docker command
>>>>> lines as it create a new layer. in that case not only RUNS  we can reduce
>>>>> WORKDIR too by using cd in following line.
>>>>>
>>>>> Is there any special reason you didn't get this from github? if you do
>>>>> that then docker file it self explain which version of pga is using it.
>>>>>
>>>>>
>>>>> On Wed, Jul 22, 2015 at 10:54 AM Pankaj Saha <[email protected]>
>>>>> wrote:
>>>>>
>>>>>> Hi Shameera,
>>>>>>
>>>>>> I think it always good create minimum layers with docker images
>>>>>> do you mean concatenating multiple RUN statements together?
>>>>>>
>>>>>>  "COPY ./ /var/www/airavata-php-gateway"
>>>>>>  is copying the content of the php gateway(
>>>>>> /var/www/airavata-php-gateway) from local host system to the docker
>>>>>> image.
>>>>>>
>>>>>> MAINTAINER to "Apache Airavata Community"
>>>>>> Yes I will change it to appropriate.
>>>>>>
>>>>>> Other docker file is also available here attached (this is also
>>>>>> uploaded to pankajsaha/dockerfiles git registry)
>>>>>>
>>>>>> Thanks
>>>>>> pankaj
>>>>>>
>>>>>> On Wed, Jul 22, 2015 at 10:24 AM, Shameera Rathnayaka <
>>>>>> [email protected]> wrote:
>>>>>>
>>>>>>> Hi Pankaj,
>>>>>>>
>>>>>>> I think it always good create minimum layers with docker images,
>>>>>>> because it is required to download large number of layers when you push
>>>>>>> this to registry. base on that I would suggest to create one layer for 
>>>>>>> all
>>>>>>> prerequisites and one layer for all php extensions. e.g.: RUN apt-get
>>>>>>> install -y apache2 php5
>>>>>>>
>>>>>>> What are the things you copy here "COPY ./
>>>>>>> /var/www/airavata-php-gateway"  ?
>>>>>>>  #--------- modifying the 000default file   section without copy
>>>>>>> command, can be reduced to one layer.
>>>>>>>
>>>>>>> If you going to contribute this to Apache, you may need to change
>>>>>>> MAINTAINER to "Apache Airavata Community"
>>>>>>>
>>>>>>> BTW what about other docker files?
>>>>>>>
>>>>>>> Thanks,
>>>>>>> Shameera
>>>>>>>
>>>>>>> On Tue, Jul 21, 2015 at 12:21 PM Pankaj Saha <[email protected]>
>>>>>>> wrote:
>>>>>>>
>>>>>>>> Hi Lahiru/shameera,
>>>>>>>>
>>>>>>>> Can you please once again review the docker file for airavata pga
>>>>>>>> and send your comments.They are available at github:
>>>>>>>> https://github.com/pankajsaha/dockerfiles. Dockerfile should be
>>>>>>>> present at the root of the airavata-php-gateway source tree structure.
>>>>>>>>
>>>>>>>> also you can see it here at attachment.
>>>>>>>>
>>>>>>>> Thanks
>>>>>>>> Pankaj
>>>>>>>>
>>>>>>>>
>>>>>>>> --
>>>>>>> Shameera Rathnayaka
>>>>>>>
>>>>>>
>>>>>> --
>>>>> Shameera Rathnayaka
>>>>>
>>>>
>>>> --
>>> Shameera Rathnayaka
>>>
>>
>> --
> Shameera Rathnayaka
>

Reply via email to