Friday, January 19, 2018

docker weblogic

https://hub.docker.com/r/ismaleiva90/weblogic12/

docker pull ismaleiva90/weblogic12
docker run -d --name myweblogic -p 49163:7001 -p 49164:7002 -p 49165:5556 ismaleiva90/weblogic12:latest
http://localhost:49163/console
User: weblogic
Pass: welcome1

exit ( go back to host )

generate a basic WAR:

mvn archetype:generate -DgroupId=com.mkyong -DartifactId=pippoWebApp -DarchetypeArtifactId=maven-archetype-webapp -DinteractiveMode=false


docker cp ./pippoWebApp/target/pippoWebApp.war myweblogic:/u01/oracle/weblogic/user_projects/domains/base_domain


then you have to manually deploy (copying to autodeploy doesn't work, this domain has PRODUCTION mode enabled)

http://localhost:7001/pippoWebApp/

See also http://www.javamonamour.org/2015/04/weblogic-deployment-with-docker.html


To get the image from Oracle itself:

https://blogs.oracle.com/weblogicserver/weblogic-server-certification-on-kubernetes

https://github.com/oracle/docker-images/tree/master/OracleWebLogic


git clone https://github.com/oracle/docker-images.git
cd docker-images/OracleWebLogic/dockerfiles

first you should download the JAr files and scp them here (this really sucks.... why not just curl them in place from a repository...)

./buildDockerImage.sh -v 12.2.1.3 -d -c







Thursday, January 18, 2018

R support in Sonatype Nexus 3.7

What is R ? https://www.r-project.org/about.html but even better https://en.wikipedia.org/wiki/R_(programming_language)

What is CRAN ? https://cran.r-project.org/ and https://en.wikipedia.org/wiki/R_(programming_language)#CRAN

"A core set of packages is included with the installation of R, with more than 11,000 additional packages (as of July 2017) available at the Comprehensive R Archive Network (CRAN), Bioconductor, Omegahat, GitHub, and other repositories."



https://github.com/sonatype-nexus-community/nexus-repository-r

git clone https://github.com/sonatype-nexus-community/nexus-repository-r.git
cd nexus-repository-r/
mvn clean install

ls target/nexus-repository-r-1.0.0.jar

docker run -d -p 8081:8081 --name nexus sonatype/nexus3
6f49bdc956a6
docker cp nexus-repository-r-1.0.0.jar 6f49bdc956a6:/opt/sonatype/nexus/system/org/sonatype/nexus/plugins/


docker exec -u 0 -ti 6f49bdc956a6 /bin/bash
stty rows 50 cols 132
cd /opt/sonatype/nexus/system/org/sonatype/nexus/plugins/
mkdir -p nexus-repository-r/1.0.0/
mv nexus-repository-r-1.0.0.jar nexus-repository-r/1.0.0/

vi /opt/sonatype/nexus/system/com/sonatype/nexus/assemblies/nexus-oss-feature/3.7.1-02/nexus-oss-feature-3.7.1-02-features.xml

customize the file as per https://github.com/sonatype-nexus-community/nexus-repository-r chapter "(most) Permanent Install" (careful! you must add 2 separate sections in the XML file! Nexus stinks, they should provide a CLI to manage plugins, instead of asking you to manually manipulate the XML )

docker stop 6f49bdc956a6
docker start 6f49bdc956a6

when you create a new repository, you should now see the r (group) r (hosted) and r (proxy) types









Tuesday, January 16, 2018

the Docker book by James Turnbull



The books - although a bit outdated - is still excellent, very practical, hands-on and detailed.