airavata-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Pankaj Saha <psa...@binghamton.edu>
Subject Re: Docker - airavata
Date Wed, 17 Jun 2015 14:21:57 GMT
Hi Lahiru
Thanks for asking those questions, this will help me clarify the plan.

I think we are not going to deliver the Dockerfile instead we will provide
a docker image so that developer can create a container out of it. My plan
is to provide a stable release or any stable  branch inside the docker
image. So that new users can setup there environment just by running the
container.

I am planning to post the docker image (not the Dockerfile) in the docker
registry. When airavata team will decide to release an official docker
image we will publish that. So it will not be inside PGA source tree.

I have no answer to the version control management. I think based on
different stable branch we can create different images. If you think its an
issue please let me know.

Well restarting apache from dockerfile was a mistake(this is just testing
docker file to start with ) I will remove that. Dockerfile`s main target is
to add all the required layers to the base ubuntu images. we can add one
separate shell script to running all these jobs. Can use a cmd to start
that.

Please let me know if my reply answers all your questions. Appreciate your
questions.

Thanks
Pankaj
On 17-Jun-2015 1:58 AM, "Lahiru Ginnaliya Gamathige" <glahiru@gmail.com>
wrote:

> Hi Pankaj,
>
> I think I can ask following questions from you.
>
> Are you planning to support development with docker ? If you put git clone
> inside Dockerfile how do I test my uncommitted code with docker ?
>
> Where are you going to store this Dockerfile ? In the PGA source tree or
> outside ?
>
> If we are going to push these images to a registry how do you version
> these images ?
>
> why did you add this line  to the Dockerfile ?
> RUN service apache2 restart
>
> Without a CMD or ENTRYPOINT how do you start this container and launch
> apache ?
>
>
> Regards
> Lahiru
>
>
> On Tue, Jun 16, 2015 at 8:19 PM, Pankaj Saha <psaha4@binghamton.edu>
> wrote:
>
>> Hey Lahiru,
>> Thanks for reviewing my script and for your comments.
>> It is not that I have not think about making a shell script instead of
>> writing all the RUN commands in Dockerfile, but I think if we want to
>> create a docker image/container i has to be in docker( that's what I do
>> understand).
>>
>> can you explain your comment where you said : *Why are you doing git
>> clone inside the docker file ?*
>>
>> Also if you can put little more description about how writing the shell
>> script create a new image and always create the docker image with the
>> name of the revision(git describe --tags) will help.
>>
>> I am little confused. If you please clarify the idea then I can try that
>> way.
>>
>> Thanks for your cooperation.
>>
>> Thanks
>> Pankaj
>>
>>
>> On Tue, Jun 16, 2015 at 7:34 PM, Lahiru Ginnaliya Gamathige <
>> glahiru@gmail.com> wrote:
>>
>>> Based on my quick look at the Dockerfile please find the comments below.
>>>
>>> Why are you doing git clone inside the docker file ? I believe this
>>> should be in the repo itself and you are already in the source tree.
>>>
>>> I think this should support the development environment and should be
>>> integrated seamlessly with the dev environment.
>>>
>>> How about writing a shell script to run whenever you do a change you run
>>> that script and it will create a new image and always create the docker
>>> image with the name of the revision(git describe --tags).
>>>
>>> You should not store data inside the docker container it should be
>>> mounted from the host environment.
>>>
>>>
>>>
>>> On Tue, Jun 16, 2015 at 4:16 PM, Pankaj Saha <psaha4@binghamton.edu>
>>> wrote:
>>>
>>>> Hello Devs,
>>>>
>>>> I am trying to writing a docker script which can create a docker image
>>>> based on Ubuntu where airavata (0.15 branch) PGA will be installed and all
>>>> related required supporting software will stay installed.
>>>>
>>>> My Dockerfile looks like this:
>>>>
>>>> ------------------------------------------------------------------------------------------------------------------------------
>>>> #---------- set the base image to Ubuntu
>>>> FROM ubuntu
>>>>
>>>> #---------- file Author / Maintainer
>>>> MAINTAINER GSoC Pankaj Saha
>>>>
>>>> #---------- update the repository sources list
>>>> RUN apt-get update
>>>>
>>>> #---------- setting the work directory as users home
>>>> WORKDIR ~/
>>>>
>>>> #---------- installing prerequisites for PGA gateway
>>>> RUN apt-get install apache2 -y
>>>> RUN sudo apt-get install php5 -y
>>>>
>>>> #---------- installing necessary php extensions
>>>> RUN apt-get install unzip -y
>>>> RUN apt-get install curl -y
>>>> RUN apt-get install openssl -y
>>>> RUN apt-get install php5-mcrypt -y
>>>>
>>>> #--------- installing  composer
>>>> RUN curl -sS https://getcomposer.org/installer | php
>>>> RUN mv composer.phar /usr/local/bin/composer
>>>>
>>>> #--------- activate mod_rewrite
>>>> RUN a2enmod rewrite
>>>> RUN service apache2 restart
>>>>
>>>> #--------- modifying the 000default file
>>>> #ADD /etc/apache2/sites-available/000-default.conf
>>>> /etc/apache2/sites-available/
>>>> WORKDIR /etc/apache2/sites-available/
>>>> RUN sed -i 's/<\/VirtualHost>/<Directory "\/var\/www"> \n AllowOverride
>>>> All \n <\/Directory> \n <\/VirtualHost>/g'  000-defau$
>>>> WORKDIR ~/
>>>>
>>>> #--------- installing git
>>>> RUN apt-get install git -y
>>>>
>>>> #--------- downloading airavata PGA
>>>>
>>>> RUN git clone https://github.com/apache/airavata-php-gateway.git
>>>> /var/www/airavata-php-gateway
>>>> WORKDIR /var/www/airavata-php-gateway
>>>> RUN git checkout airavata-php-gateway-0.15-release
>>>> WORKDIR ~/
>>>> #--------- making storage folder writable
>>>> RUN chmod -R 777 /var/www/airavata-php-gateway/app/storage
>>>>
>>>> -----------------------------------------------------------------------------------------------------------------------------------
>>>>
>>>> PGA web server should stay alive on default 80 port . Now from the
>>>> image, that my Dockerfile is creating, I am creating a running container.
I
>>>> am facing trouble to check whether my host is able to listen from the
>>>> default 80 port of the docker container. I am trying to figure it out, but
>>>> if anyone has previous experience on this please guide me.
>>>>
>>>> Thanks
>>>> Pankaj
>>>>
>>>>
>>>>
>>>>
>>>>
>>>>
>>>>
>>>>
>>>
>>
>

Mime
View raw message