You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomee.apache.org by mauro2java2011 <ma...@gmail.com> on 2015/11/29 16:50:05 UTC
INSTALL TOMEE with docker
Hi all.
I am newbie to docker container.
I would try to install a my web app with tomee using docker container.
Please i ask if exist a tutorial or article on a blog that explain to
install tomee with docker.
--
View this message in context: http://tomee-openejb.979440.n4.nabble.com/INSTALL-TOMEE-with-docker-tp4677016.html
Sent from the TomEE Users mailing list archive at Nabble.com.
Re: INSTALL TOMEE with docker
Posted by Bjorn Danielsson <bj...@lists.cuspycode.com>.
Hi Mauro,
If you can install your webapp on a Linux VM first, it's easy to
repackage it for a Docker install. Just prepare a folder with copies
of the TomEE install (assuming /opt here), and anything else needed
(assuming /etc for e.g. daemon init scripts), and a start.sh script
that starts TomEE and any other services required. This would be the
minimal Dockerfile:
ADD opt /opt
ADD etc /etc
ADD start.sh /root/
EXPOSE 443
WORKDIR /root
CMD ./start.sh
--
Bjorn Danielsson
Cuspy Code AB
mauro2java2011 <ma...@gmail.com> wrote:
> Hi all.
> I am newbie to docker container.
> I would try to install a my web app with tomee using docker container.
>
> Please i ask if exist a tutorial or article on a blog that explain to
> install tomee with docker.
>
>
>
>
> --
> View this message in context: http://tomee-openejb.979440.n4.nabble.com/INSTALL-TOMEE-with-docker-tp4677016.html
> Sent from the TomEE Users mailing list archive at Nabble.com.
Re: INSTALL TOMEE with docker
Posted by hwaastad <he...@waastad.org>.
Hi,
when you have made/built your tomee container you should have a look at
jolokia docker plugin and properties-maven-plugin.
Basically you would do something like this (maven, BTW):
<plugin>
<groupId>org.jolokia</groupId>
<artifactId>docker-maven-plugin</artifactId>
<version>0.13.6</version>
<configuration>
<images>
<image>
<registry>{private registry if
available}</registry>
<alias>{your app finalname}</alias>
<name>{your docker image}</name>
<build>
<from>{the dependent tomee image}</from>
<assembly>
<descriptor>assembly.xml</descriptor>
<basedir>/usr/local/tomee/webapps/</basedir>
</assembly>
<tags>
<tag>${docker.tag}</tag>
</tags>
<ports>
<port>${run.port}</port>
</ports>
<env>
<CATALINA_OPTS>${my_catalina_opts}</CATALINA_OPTS>
</env>
</build>
<run>
<ports>
<port>${run.port}:${run.port}</port>
</ports>
</run>
</image>
</images>
</configuration>
</plugin>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>properties-maven-plugin</artifactId>
<version>1.0-alpha-2</version>
<executions>
<execution>
<phase>initialize</phase>
<goals>
<goal>read-project-properties</goal>
</goals>
<id>read-project-properties</id>
</execution>
</executions>
<configuration>
<files>
<file>${project.basedir}/src/main/docker/environment.properties</file>
</files>
</configuration>
</plugin>
assembly:
<assembly
xmlns="http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.2"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.2
http://maven.apache.org/xsd/assembly-1.1.2.xsd">
<dependencySets>
<dependencySet>
<useProjectArtifact>true</useProjectArtifact>
<includes>
<include>{your app artifact}</include>
</includes>
<outputDirectory>.</outputDirectory>
<outputFileNameMapping>{your app}.war</outputFileNameMapping>
</dependencySet>
</dependencySets>
</assembly>
environment.properties
my_catalina_opts= -D<whatever>...
So mvn clean package docker:build
(mvn docker:push for uploading to registry)
If you use generic names for all properties it's easy to build an app which
you can deploy in lab/prod/whatever just by changing docker links (and env
vars)
cheers,
hw
--
View this message in context: http://tomee-openejb.979440.n4.nabble.com/INSTALL-TOMEE-with-docker-tp4677016p4677019.html
Sent from the TomEE Users mailing list archive at Nabble.com.
Re: INSTALL TOMEE with docker
Posted by Christoph Nenning <Ch...@lex-com.net>.
> ok i have view to https://github.com/tomitribe/docker-tomee
> <https://github.com/tomitribe/docker-tomee>
>
> how i can install on docker ?
The files in this repo are used to build docker-images. You could use them
to build your own tomee-base-imgage. But there are also pre-built images
available on docker hub:
https://hub.docker.com/_/tomee/
> and install it on openshift using docker?
>
>
You might want to have a look at this:
https://docs.openshift.com/enterprise/3.0/install_config/install/docker_registry.html
Regards,
Christoph
This Email was scanned by Sophos Anti Virus
Re: INSTALL TOMEE with docker
Posted by mauro2java2011 <ma...@gmail.com>.
ok i have view to https://github.com/tomitribe/docker-tomee
<https://github.com/tomitribe/docker-tomee>
how i can install on docker ?
and install it on openshift using docker?
--
View this message in context: http://tomee-openejb.979440.n4.nabble.com/INSTALL-TOMEE-with-docker-tp4677016p4677020.html
Sent from the TomEE Users mailing list archive at Nabble.com.
Re: INSTALL TOMEE with docker
Posted by "John D. Ament" <jo...@apache.org>.
Just wondering, are you working off of a tomee docker image?
https://github.com/tomitribe/docker-tomee
John
On Sun, Nov 29, 2015 at 11:06 AM mauro2java2011 <ma...@gmail.com>
wrote:
> Hi all.
> I am newbie to docker container.
> I would try to install a my web app with tomee using docker container.
>
> Please i ask if exist a tutorial or article on a blog that explain to
> install tomee with docker.
>
>
>
>
> --
> View this message in context:
> http://tomee-openejb.979440.n4.nabble.com/INSTALL-TOMEE-with-docker-tp4677016.html
> Sent from the TomEE Users mailing list archive at Nabble.com.
>