Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update do Dockerfile #31

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
47 changes: 22 additions & 25 deletions src/main/resources/ctxs/jboss/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,18 +1,26 @@
# -------------------------- Dockerfile (jboss) -------------------------- #

FROM centos:7.1.1503
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Na TLB estamos testando com o UBUNTU 18.04, algumas mudanças são necessárias, mas bem pontuais.

  • Java SDK ".rpm" uso do Alien para converter *.deb e fazer a instalação na execução do Docker file
FROM ubuntu:18.04
...
COPY apps/jdk-7u71-linux-x64.rpm /tmp

RUN set eux; \
 alien --to-deb --script --install /tmp/jdk-7u71-linux-x64.rpm;\
...

MAINTAINER [email protected]
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tipo descontinuado

LABEL maintainer="JFRJ<[email protected]>; Marcelo de Oliveira Batista <[email protected]>" \



#--- UTILITARIOS ---
RUN yum -y install unzip
RUN yum -y install tar
RUN yum -y install curl

# Cria estruturas de diretorios
RUN mkdir -p /opt/jboss-eap-6.2/welcome-content/ckeditor/ \
&& mkdir -p /home/resource/ \
&& mkdir -p /opt/jboss-eap-6.2/modules/ \
&& mkdir -p /siga/jdbctool-1.0/ \
RUN set eux; \
&& groupadd -g 52677 jboss \
&& useradd -m -u 52677 -g jboss -c "JBoss EAP Admin User" jboss \
&& ln -s /opt/jboss-eap-6.2 /opt/jboss \
&& mkdir -p /var/log/jboss/sigadoc \
&& mkdir -p /opt/jboss/sigadoc/deployments \
&& mkdir -p /opt/jboss-eap-6.2/welcome-content/ckeditor/ \
&& mkdir -p /home/resource/ \
&& mkdir -p /opt/jboss-eap-6.2/modules/ \
&& mkdir -p /siga/jdbctool-1.0/ \
&& mkdir -p /siga

# Adiciona JDK homologada com aplicação SIGA
Expand Down Expand Up @@ -74,12 +82,7 @@ ADD apps/ckeditor_4.5.7_full.zip /siga/
RUN unzip /siga/ckeditor_4.5.7_full.zip -d /opt/jboss-eap-6.2/welcome-content/ckeditor/

# Cria usuário jboss para execução do JBoss EAP
RUN groupadd -g 52677 jboss \
&& useradd -m -u 52677 -g jboss -c "JBoss EAP Admin User" jboss \
&& ln -s /opt/jboss-eap-6.2 /opt/jboss \
&& mkdir -p /var/log/jboss/sigadoc \
&& mkdir -p /siga \
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Instrução repetida

&& mkdir -p /opt/jboss/sigadoc/deployments \
RUN set eux; \
&& chown -R jboss:jboss /home/jboss/ \
&& chown -R jboss:root /siga/ \
&& chown -R jboss:jboss /home/resource/ \
Expand All @@ -99,22 +102,16 @@ COPY lib/ojdbc6.jar /siga/jdbctool-1.0/lib/ojdbc6.jar

# -- Instalacao flyway --
COPY lib/ojdbc6.jar /siga/flyway-3.0/jars/ojdbc6.jar
COPY conf/flyway/flyway.corporativo.properties /siga/flyway-3.0/conf/
COPY conf/flyway/flyway.siga.properties /siga/flyway-3.0/conf/
COPY conf/flyway/flyway.sigawf.properties /siga/flyway-3.0/conf/
COPY conf/flyway/flyway.sigasr.properties /siga/flyway-3.0/conf/
COPY conf/flyway/flyway.sigagc.properties /siga/flyway-3.0/conf/
COPY conf/flyway/flyway.sigatp.properties /siga/flyway-3.0/conf/
COPY conf/flyway/* /siga/flyway-3.0/conf/
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

O coriga funciona e elimina a necessidade de execução de comando repetitivos.


#--- inicializacao default e aplicacao de patch do JBOSS
RUN tar -xzf /opt/jboss-eap-6.2/jboss-eap-6.2.tar.gz -C /opt/jboss-eap-6.2/
RUN unzip /opt/jboss-eap-6.2/jboss-eap-6.2.3-patch.zip -d /opt/jboss-eap-6.2/
RUN tar -xzf /opt/jboss-eap-6.2/modules/modulos-siga.tar.gz -C /opt/jboss-eap-6.2/modules/
RUN tar -xzf /siga/jdbctool-1.0/jdbctool-1.0.tar.gz -C /siga/jdbctool-1.0/
RUN tar -xzf /siga/flyway-commandline-3.0.tar.gz -C /siga/

RUN chmod +x /opt/jboss-eap-6.2/patchapply.sh
RUN /opt/jboss-eap-6.2/patchapply.sh
ADD /opt/jboss-eap-6.2/jboss-eap-6.2.tar.gz -C /opt/jboss-eap-6.2/
ADD /opt/jboss-eap-6.2/modules/modulos-siga.tar.gz -C /opt/jboss-eap-6.2/modules/
ADD /siga/jdbctool-1.0/jdbctool-1.0.tar.gz -C /siga/jdbctool-1.0/
ADD /siga/flyway-commandline-3.0.tar.gz -C /siga/


RUN /opt/jboss/bin/jboss-cli.sh --command="patch apply /opt/jboss-eap-6.2/jboss-eap-6.2.3-patch.zip"
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Script pode ser executado sem a necessidade de unzip do arquivo de patch

ADD scripts/inicializacao.sh /siga/
RUN chmod +x /siga/inicializacao.sh
CMD bash -c '/siga/inicializacao.sh'
Expand Down