-
Notifications
You must be signed in to change notification settings - Fork 4
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
base: master
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,18 +1,26 @@ | ||
# -------------------------- Dockerfile (jboss) -------------------------- # | ||
|
||
FROM centos:7.1.1503 | ||
MAINTAINER [email protected] | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe 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 | ||
|
@@ -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 \ | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe 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/ \ | ||
|
@@ -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/ | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe 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" | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe 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' | ||
|
There was a problem hiding this comment.
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.