[ 
https://issues.apache.org/jira/browse/KARAF-7118?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17329159#comment-17329159
 ] 

Pasi Österman edited comment on KARAF-7118 at 4/22/21, 2:43 PM:
----------------------------------------------------------------

I run it through docker-compose so whatever the official docker image uses.
  
 based on 
[this|[https://github.com/apache/karaf/blob/main/assemblies/docker/Dockerfile]] 
or 
[this|https://hub.docker.com/layers/apache/karaf/4.2.11/images/sha256-2798ea76956c47f8aa949562c1d8eba0a8719f814010a4f7c25c12cb33e06e7e?context=explore]
 its karaf run.
  
 Here's the full docker-compose, nothing special there other than few named 
volumes to persist data and shared etc, deploy and .m2 folders for quick and 
easy configuration.
  
{code:java}
version: "2.4"
services:  karaf-runtime:
  container_name: karaf
  image: apache/karaf:4.2.11
  ports:
    - 8101:8101
    - 8181:8181
    - 1098:1098      
  volumes:
    - ./karaf/etc:/opt/apache-karaf/etc:z
    - ./karaf/deploy:/opt/apache-karaf/deploy:z
    - karaf-data:/opt/apache-karaf/data:z
    - ~/.m2:/root/.m2:z
    - karaf-history:/root/.karaf:z

volumes:
  karaf-data:
  karaf-history:
{code}
 

Logging with default logger that camel (2.25.3) uses,


was (Author: pasi.osterman):
I run it through docker-compose so whatever the official docker image uses.
 
based on 
[this|https://hub.docker.com/layers/apache/karaf/4.2.11/images/sha256-2798ea76956c47f8aa949562c1d8eba0a8719f814010a4f7c25c12cb33e06e7e?context=explore]
 its karaf run.
 
Here's the full docker-compose, nothing special there other than few named 
volumes to persist data and shared etc, deploy and .m2 folders for quick and 
easy configuration.
 
{code:java}
version: "2.4"
services:  karaf-runtime:
  container_name: karaf
  image: apache/karaf:4.2.11
  ports:
    - 8101:8101
    - 8181:8181
    - 1098:1098      
  volumes:
    - ./karaf/etc:/opt/apache-karaf/etc:z
    - ./karaf/deploy:/opt/apache-karaf/deploy:z
    - karaf-data:/opt/apache-karaf/data:z
    - ~/.m2:/root/.m2:z
    - karaf-history:/root/.karaf:z

volumes:
  karaf-data:
  karaf-history:
{code}
 

 

> Logs flooding karaf shell - Docker image
> ----------------------------------------
>
>                 Key: KARAF-7118
>                 URL: https://issues.apache.org/jira/browse/KARAF-7118
>             Project: Karaf
>          Issue Type: Bug
>          Components: karaf
>    Affects Versions: 4.2.11
>         Environment: *Windows 10 Enterprise* - Version 10.0.18363 Build 18363
> *Docker desktop* - 3.3.1
>  * *Docker* - version 20.10.5, build 55c4c88
>  * *docker-compose* - version 1.29.0, build 07737305
>  * WSL-2 based engine
> *Windows Terminal* - 1.7.1033.0
> *powershell* -  5.1.18362.1171
>            Reporter: Pasi Österman
>            Priority: Minor
>              Labels: camel, docker, docker-compose, karaf-shell, logging, 
> slf4j
>         Attachments: karaf-shell-logging-bug.zip
>
>
> Bundle logs keep flooding the shell after stopping log:tail with ctrl+c.
> Logging in and out from shell fixes the issue momentarily but it will usually 
> reappear after bundle gets updated through bundle:update, bundle:watch or 
> started with bundle:start and bundle:restart or if log:tail is used. This 
> seems to only happen with the official docker image so probably something 
> related to displaying docker container logs.
> Attachement has docker-compose, log-spammer bundle project and readme.md with 
> instructions how to reproduce.
> log-spammer bundle is a  simple camel project with timer that logs every 2s 
> using slf4j.
> –
> Using karaf with docker-compose to quickly startup local karaf server for 
> local development. I can make my own custom docker image as a workaround 
> without any docker logging using the apache-karaf-4.2.11.zip file downloaded 
> from the site.
>  



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

Reply via email to