mauro pereira

há 1 ano · 1 min. de leitura · ~10 ·

Blogging
>
Blog por mauro
>
Tomcat Docker

Tomcat Docker

Hoje iremos criar um simples container docker com Apache “Tomcat/10.0.23” de maneira rápida e com poucas linhas de código.

| Apache Tomeat/10023 x

# Bookmarks (4 PostgresQLT

€ > C OO O localhost sos

a <r wm QO »0@
W Mysql @ Red bat FRee. & passwordReco 8 hlhos @8 Mauroslucios @8 cursos BB carros =» 8 Outros favontos
Home Documentation Configuration Examples Wiki Mailing Lists Find Help

Apache Tomcat/10.0.23

J reach {EL

 

 

If you're seeing this, you've successfully installed Tomcat. Congratulations!

F

Developer Quick Start

Recommended Reading

Security Considerations How-To
Manager Application How-To
Clustening/Session Replication How-To

 

Tomeat Set Reams & AAA Examples
First Web Application 08C Datasources

Managing Tomcat Documentation

For wecunty, access fo the manager webapp is Tomcat 10.0 Documentation
rested Users are defined eC

SCATAL INA HOWE /cont/ Tomcat users sal

Tomcat Wiki

tonal important configuration
maton a1

1 Tomcat 10.0 access (0 the manages
appicaton r spit between ferent users
Read more -

SCATAL INA ORE /R0TNG, Ext

   

Release Notes

Developers may be nirested
Chanaeloa

Getting Help

FAQ and Mailing Lists
The toon masking iets are avast

gers er
User separ arc Gruso: kor Aache Tags

Para isto iremos criar um Dockerfile com as instruções da images e faremos o build desta imagem.

Abra o “visual studio code”, “nano”, “vi” ou qualquer outro editor de sua preferência e insira o seguinte código:

 

;

©

5

[TET eee)
[EOP I)

Lo
ooc

[ZEPET

  

 

Trey
ye
CS 3

 

[Rn perp vy

ELE

 

Dockertile - java - Visual Studio Code

 

 

colt

[rey

uti

 

0

Doceert ©

LT ZL

 

Instruções:

  • FROM - imagem base oficial
  • ENV - variáveis de ambiente
  • RUN - define os recursos do container em tempo de execução
  • EXPOSE - mapeia porta do host para o container
  • CMD - executa um comando no container

Agora basta criar o build da imagem:

  • docker build -t mauroslucios/tomcat-10.0.23:v1 .

Tela de build da imagem abaixo:

= mauros@mauroslucios: ~/Documentos/docker-projects/itau/java a

mauros@mauroslucios: ~/Documentos/docker-projects/itau/java « mauros@mauroslucios: ~/Documentos/docker-projects/itau/java

 

Re TTP
Sending bulld context to Docker daemon 2.048kS
Step 1/6 : FROM java:8-jre
ERCEEE PIE TF
Step 2/6 : ENV CATALINA WOME /usr/local/tomcat
ERTSUraTey
ERE ERLE LEERY
Step 3/6 : ENV PATH SCATALINA MOME/bin:SPATH
ERTSvrR eT
BIC Ltr
Step 4/6 : RUN cd Jusr/local/ 88 wget http://mirrors.n247.ro/apache/toncat /toncat-10/v10.0.23/bin/apache toncat-10.0.23. tar.gz
ar xzf apache-toncat-10.0.23.tar.gz 88 nv apache-toncat-10.0.23/ toncat/
> Running in 989afc792313

   

u/javas docker build -t mauroslucios/tomcat-18.8.23:v1 .

  

 

3

Apois isso ao executarmos o comando:

  • docker images

Veremos a imagem criada.

o mauros@mauroslucios: ~/Documentos/docker-projects/itau/java fo)
mauros@mauroslucios: ~/Documentos/docker-projects/itau/java mauros@mauroslucios: ~/Documentos/docker-projects/itau/java
er DY EI TI ee
LT TS og TAC JENS [LISI F391
Paurosluclos/toncat 10.0.23 vi a50887b27001 21 minutes ago 3394)
Tr UCI IIT PY} ERE ET)
Le 464102713902 2 weeks ago PRT
localstack/localstack 122075471038 4 weeks ago parse
adniner PPT TELIT PT TR TT Sty ELT
busybox PPT IIT LTR Sty Jt
nauroslucios/node-web- app PIC TET CRE SO) PRT
TA TILLY JEP ET: 509a3196113a 3 months ago PRT
re 84b87dd2d11d 4 months ago Par
ey 101513158291 5 months ago pre
ITO PUPIL YR RE TP) LIP
ao 3218b38490ce 7 months ago Be
4c0767d61943 8 months ago 944mg
PTE LPL PET TR ETL Dy Fey
TTA] PIEPER TP VRE JETT) FEE
rT] fefd78e9381a 9 months ago Er
TELE ccboce3fadbd 10 months ago 204ms
phpyadain/phpayadain [ELE 2e5141bbcbfb 13 months ago 474mg
java [RI 4446218862 5 years ago Et
maurosgnaurosluct s

Execute um container com base nesta imagem:

  • docker run -p 8080:8080 --name=tomcat mauroslucios/tomcat-10.0.23:v1
mauros@mauroslucios: ~/Documentos/docker-projects/itau/java

  
 

    

   

       
 
  
   

 

   
 
 
 
 

 

 

 

 

 

  

mauros@mauroslucios: ~/Documentos/docker-projects/itau/java BS mauros@mauroslucios: ~/Documentos/docker-projects/itau/java . -
Th ETAT Ee SESE AN A EEE a CE a TT TH TT RE PE SE TR ITN TIS IVR Er TR TRC:
26-Jul-2022 23:36:00.569 INFO [main] org.apache.catalina. startup. versionioggeriistener.log Server version name: Apache Toncat/10.8.23
26-Jul-2022 23:36:00.571 INFO [main] org.apache.catalina.startup.Versionioggert istener. log Server bull: Jul 14 2022 08:16:11 UTC
26-Jul-2022 23:36:00.571 INFO [main] org.apache.catalina. startup. Versionioggeriistener.log Server version nunber: 10.0.23.0
26-Jul-2022 23:36:00.572 INFO [main] org.apache.catalina. startup. Versionioggertistener. log 05 Name: [Rv
26-Jul-2022 23:36:00.572 INFO [main] org.apache.catalina.startup.Versionioggert istener. log 05 Version: PRT I TET
26-Jul-2022 23:36:00.572 INFO [main] org.apache.catalina.startup.Versionioggert istener. log Architecture: pr
26-Jul-2022 23:36:00.573 INFO [main] org.apache.catalina. startup. Versionioggeriistener. log Java Home: Just /1ib/ jvn/ java-8-openjdk
TeIa
26-Jul-2022 23:36:00.573 INFO [main] org.apache.catalina. startup. Versionioggeriistener.log JVM Version: 1.8.0 111-8u111-b14-2-bpo8e1
b14
26-Jul-2022 23:36:00.573 INFO [main] org.apache.catalina.startup.Versionioggertistener.log JVM Vendor: [EUR IPI TT
TRE MET] INFO [main] org.apache.catalina. startup. Versiontoggert istener. log CATALINA BASE: Just [local /toncat
26-Jul-2022 23:36:00.573 INFO [main] org.apache.catalina. startup. Versionioggeriistener. log CATALINA HOME: ESAT TITS
26-Jul-2022 23:36:00.575 INFO [main] org.apache.catalina. startup. Versionioggeriistener.log Command Line argument: -Djava.util.logging.config.f
ICT VI YI LY Pr PO
26-Jul-2022 23:36:00.575 INFO [main] org.apache.catalina. startup. Versionioggertistener. log Command Line argument: -Djava.util.logging.manager
org.apache. Juli Classi oadertogianager
26-Jul-2022 23:36:00.575 INFO [main] org.apache.catalina. startup. Versionioggeriistener. log Command Line argument: -Djdk.tls.ephemeralDHKeySize
FLT
26-Jul-2022 23:36:00.575 INFO [main] org.apache.catalina. startup. Versionioggeriistener.log Command Line argument: -Djava.protocol.handler. pkgs
I TL TIL LCR See
26-Jul-2022 23:36:00.575 INFO [main] org.apache.catalina. startup. Versionioggeriistener.log Command Line argument: -Dorg.apache.catalina. secur
ty.Securitylistener UNASK=0027
26-Jul-2022 23:36:00.576 INFO [main] org.apache.catalina. startup. Versionioggeriistener. log Command Line argument: -Dignore.endorsed. dirs
26-Jul-2022 23:36:00.576 INFO [main] org.apache.catalina. startup. Versionioggeriistener.log Command Line argument: -Dcatalina.base-/usr/local/t
CE
26-Jul-2022 23:36:00.576 INFO [main] org.apache.catalina. startup. Versionioggeriistener.log Command Line argument: -Dcatalina. home /usr/local/t
CE
26-Jul-2022 23:36:00.576 INFO [main] org.apache.catalina. startup. Versionioggeriistener.log Command Line argument: -Djava.io.tmpdir=/usr/local/
tomcat/tenp
26-Jul-2022 23:36:00.579 INFO [main] org.apache.catalina.core.Apriifecyclelistener. lifecycletvent The Apache Tomcat Native Library which allow

ET LL TNR TLE I IRL Te

 

 

/1ib/x86_64-Uinux-gnu: /usr/Uib/ nt: /1ib: fusr/Uib]

FRI
FTREIY

 

2622 23:36:01.033 INFO [main] org
2022 23:36:01.078 INFO [main] org

      

ache.catalina. startup. Catalin,

       

 

 

 

Ubrary.path: [/usr/java/packages/Lib/and6d: [usr /1ib/x86 64-Linux-gnu/jni:/Lib/x86 64-1inux-gnu:/usr

ache. coyote. AbstractProtocol. init Initializing ProtocolMandler [“http-nio-80807]
load Server initialization in [748] milliseconds

Agora vá até localhost:8080 e verá uma tela como a imagem abaixo.

| Apache Tomeat/10023 x

# Bookmarks (4 PostgresQLT

€ > C OO O localhost sos

a <r wm QO »0@
W Mysql @ Red bat FRee. & passwordReco 8 hlhos @8 Mauroslucios @8 cursos BB carros =» 8 Outros favontos
Home Documentation Configuration Examples Wiki Mailing Lists Find Help

Apache Tomcat/10.0.23

J reach {EL

 

 

If you're seeing this, you've successfully installed Tomcat. Congratulations!

F

Developer Quick Start

Recommended Reading

Security Considerations How-To
Manager Application How-To
Clustening/Session Replication How-To

 

Tomeat Set Reams & AAA Examples
First Web Application 08C Datasources

Managing Tomcat Documentation

For wecunty, access fo the manager webapp is Tomcat 10.0 Documentation
rested Users are defined eC

SCATAL INA HOWE /cont/ Tomcat users sal

Tomcat Wiki

tonal important configuration
maton a1

1 Tomcat 10.0 access (0 the manages
appicaton r spit between ferent users
Read more -

SCATAL INA ORE /R0TNG, Ext

   

Release Notes

Developers may be nirested
Chanaeloa

Getting Help

FAQ and Mailing Lists
The toon masking iets are avast

gers er
User separ arc Gruso: kor Aache Tags

Até a próxima!

Mauro Lúcio Pereira da Silva

Ciência e Tecnologia
Comentários

Artigos de mauro pereira

Ver blog
há 1 ano · 4 min. de leitura

A AWS web services nos dá uma gama muito grande de serviços onde pode-se apenas preocupar-se com o d ...

há 1 ano · 1 min. de leitura

No Console do AWS, Acesse o RDS Management Console · No painel de navegação esquerdo, clique em Data ...

Profissionais relacionados

Você pode estar interessado nestes trabalhos

  • Listenx | Business Soundtrack

    Consultor de Vendas Internas Pleno

    Encontrado em: Talent BR 2A C2 - há 3 dias


    Listenx | Business Soundtrack Sao Paulo, Brasil

    A · Listenx · é a líder em trilhas sonoras para negócios no Brasil.Utilizamos · tecnologia · para criar · trilhas · e · anúncios · comerciais para ajudar os negócios a entregar experiências e impulsionar as vendas usando · música · , · comunicação · e · tecnologia · . Atualmente ...

  • Grupo Zelo

    Agente Funerário V

    Encontrado em: Talent BR C2 - há 1 dia


    Grupo Zelo Brasília, Brasil

    NÓS QUEREMOS VOCÊ NO NOSSO TIME · Temos orgulho em dizer que compomos um time de mais de 4000 colaboradores atuando em sinergia em mais de 150 cidades, e que somos os protagonistas da construção do Grupo e sua evolução. · Para cumprir nossa missão, precisamos de pessoas que tenha ...

  • Cronoshare

    Arquiteto para projeto residencial

    Encontrado em: Cronoshare BR C2 - há 3 dias


    Cronoshare Itatiba (São Paulo), Brasil

    Necessito um serviço de Arquitetos com as seguintes características:Sou... · Particular · Qual serviço você procura? · Projeto residencial · Qual é o tipo de imóvel? · Apartamento · Qual é o tamanho do seu projeto? · De 50 a 100 m2 · Quando pretende realizar o serviço? · Mais de ...