You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@sling.apache.org by Robert Munteanu <ro...@apache.org> on 2015/10/01 21:36:20 UTC

Dockerfile for Sling

Hi,

I added an initial version of a Dockerfile for the Sling Launchpad -
you can find it under 
http://svn.apache.org/repos/asf/sling/trunk/launchpad/docker/ . In my
limited tests it works as expected, but since I'm not a Docker expert I
probably missed some things.

It would be great if anyone with more knowledge would take a look. I
plan to use it to build an 'official' docker image for the Launchpad 8
release which would be pushed on Docker Hub.

Thanks,

Robert

Re: Dockerfile for Sling

Posted by Robert Munteanu <ro...@apache.org>.
On Sat, 2015-10-03 at 10:49 +0200, Roy Teeuwen wrote:
> I think if you would go for that approach that instead of downloading
> maven manually like in your cluster prototype,
>  using an actual official maven docker image would be even better
> suited:
> https://hub.docker.com/_/maven/ <https://hub.docker.com/_/maven/>;
> 
> Roy

Good point, thanks!

Robert

Re: Dockerfile for Sling

Posted by Roy Teeuwen <ro...@teeuwen.be>.
I think if you would go for that approach that instead of downloading maven manually like in your cluster prototype,
 using an actual official maven docker image would be even better suited:
https://hub.docker.com/_/maven/ <https://hub.docker.com/_/maven/>

Roy

> On 01 Oct 2015, at 23:45, Robert Munteanu <ro...@apache.org> wrote:
> 
> On Thu, 2015-10-01 at 23:18 +0200, Bertrand Delacretaz wrote:
>> Hi,
>> 
>> On Thu, Oct 1, 2015 at 9:36 PM, Robert Munteanu <ro...@apache.org>
>> wrote:
>>> ...http://svn.apache.org/repos/asf/sling/trunk/launchpad/docker/ ..
>>> .
>> 
>> FWIW the Dockerfile from my docker-sling-cluster prototype from last
>> year also installs Maven and builds Sling locally, such a technique
>> allows for running the Sling trunk by just specifying which svn
>> version or tag you want. It also starts Sling at image build time, to
>> make startup of the final image faster.
>> 
>> It's at [1] and can be simplified today, by using a java:8 base image
>> as yours does. We might need different flavors of those images, I'm
>> not saying you should change yours.
> 
> Ah, interesting approach. What is not clear to me is how this would
> work for distribution. If we build the docker image with the
> Sling home already populated then we 'decide' the runmode, context
> path, etc in advance. It starts up faster, indeed, but it's less
> flexible.
> 
> It might be worth creating different flavour though ( oak-tar, oak
> -mongo, etc ).
> 
> Robert


Re: Dockerfile for Sling

Posted by Robert Munteanu <ro...@apache.org>.
On Thu, 2015-10-01 at 23:18 +0200, Bertrand Delacretaz wrote:
> Hi,
> 
> On Thu, Oct 1, 2015 at 9:36 PM, Robert Munteanu <ro...@apache.org>
> wrote:
> > ...http://svn.apache.org/repos/asf/sling/trunk/launchpad/docker/ ..
> > .
> 
> FWIW the Dockerfile from my docker-sling-cluster prototype from last
> year also installs Maven and builds Sling locally, such a technique
> allows for running the Sling trunk by just specifying which svn
> version or tag you want. It also starts Sling at image build time, to
> make startup of the final image faster.
> 
> It's at [1] and can be simplified today, by using a java:8 base image
> as yours does. We might need different flavors of those images, I'm
> not saying you should change yours.

Ah, interesting approach. What is not clear to me is how this would
work for distribution. If we build the docker image with the
Sling home already populated then we 'decide' the runmode, context
path, etc in advance. It starts up faster, indeed, but it's less
flexible.

It might be worth creating different flavour though ( oak-tar, oak
-mongo, etc ).

Robert

Re: Dockerfile for Sling

Posted by Bertrand Delacretaz <bd...@apache.org>.
Hi,

On Thu, Oct 1, 2015 at 9:36 PM, Robert Munteanu <ro...@apache.org> wrote:
> ...http://svn.apache.org/repos/asf/sling/trunk/launchpad/docker/ ...

FWIW the Dockerfile from my docker-sling-cluster prototype from last
year also installs Maven and builds Sling locally, such a technique
allows for running the Sling trunk by just specifying which svn
version or tag you want. It also starts Sling at image build time, to
make startup of the final image faster.

It's at [1] and can be simplified today, by using a java:8 base image
as yours does. We might need different flavors of those images, I'm
not saying you should change yours.

-Bertrand

[1] https://github.com/bdelacretaz/docker-sling-cluster/blob/master/docker/sling/Dockerfile