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

Pasi Österman commented on KARAF-7118:
--------------------------------------

Oh you're right, altho had to use 
{code:shell}
karaf server
{code}

otherwise the container will exit out after startup.

{code:yaml}
version: "2.4"
services:

  karaf-runtime:
    container_name: karaf
    image: apache/karaf:4.2.11
    # build: ./images/apache-karaf/
    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
    command: [ karaf, server ]

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

Thanks.

> 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