keronvine.blogg.se

Glassfish container
Glassfish container




  1. #GLASSFISH CONTAINER HOW TO#
  2. #GLASSFISH CONTAINER UPGRADE#
  3. #GLASSFISH CONTAINER PASSWORD#

There are several steps to set all in order. In short the application has a JMS connection factory, several JMS queues, a data source and some other glassfish application specific settings for sign-on and security.

#GLASSFISH CONTAINER HOW TO#

I am not going to insist on how to setup the application specific configurations and how to deploy the binary. I already have a glassfish domain under which I deployed my EJB 3.1 application.

glassfish container

STEP 5: Customize the glassfish based application image with our own glassfish 3.1.2

glassfish container

If we need to interrupt the config at any point make sure to restart container 2a5eb73b4c45 to continue. In case we stop and restart this same container the change is still there. In case we start a new container from the original image all is lost. Note that this change is only on this container. Remove the old Java from the container filesystem: Our application container id is 2a5eb73b4c45 and as we can see there is a devicemapper that has that prefixĬopy the new Java JDK in the container filesystem:Ĭp -R /usr/java/jdk1.8.0_45 /home/docker/devicemapper/mnt/20bc2f7c1869c1b5e4aa1b8a874e5c06694fd4b59962edef4237d674104b4764/rootfs/usr/java/jdk1.8.0_45 dev/mapper/truecrypt2 591G 543G 18G 97% /media/truecrypt2 dev/mapper/truecrypt1 99G 78G 16G 84% /media/truecrypt1 We will copy inside the container file-system the new JDK.įirst try to identify under which devicemapper device the container file-system is mounted.įilesystem Size Used Avail Use% Mounted on

#GLASSFISH CONTAINER UPGRADE#

We need to upgrade it to JDK 1.8 for our EJB 3.1 application. The default image we use as a base point has a JAVA 1.7 JRE installed. STEP 4: Customize the glassfish based application image with our own JAVA JDK. As a result we will be able to access from this container the db with the server name postgres. Note also that we link the container with the postgres container and we give it the alias postgres. Note: In a docker run command we can either use the alias of the image or the Image ID as the last parameter of the command. STEP 3: Start a new container from glassfish image docker run -link postgres:postgres -p 7001:7001 f91e27f33f26 The above parameters must be specified in the data source definition in the glassfish container.ĭocker run -e POSTGRES_USER=myDB -e POSTGRES_PASSWORD=myPassword -e POSTGRES_DB=myDB -name postgres docker.io/postgres This way we can create the custom parameters the EJB3 application expects to exist. – POSTGRES_DB= a database to be created when the postgres container is initialized and associated with the above user

#GLASSFISH CONTAINER PASSWORD#

– POSTGRES_PASSWORD= a user name password to be created when the postgres container is initialized – POSTGRES_USER= a user name to be created when the postgres container is initialized

glassfish container

Specify the following environment variables to the postgres image: STEP 2: Start new container from postgres image Note that we already have a local registry.ĭocker.io/postgres latest f91e27f33f26 4 weeks ago 263.8 MBĭocker.io/registry 2 541a6732eadb 4 weeks ago 33.27 MBĭocker.io/mtuanp/glassfish latest 46d7536ed8af 7 months ago 700 MB STEP 1: Pull from docker.io registry the Glassfish and Postgres images In connection with this a Postgres docker image from which we start a container with a certain database name and user to be used by the application docker image. In the following post I am going to describe how to create a custom docker image that contains the following:






Glassfish container