Code Monkey home page Code Monkey logo

Comments (12)

amir20 avatar amir20 commented on August 18, 2024 1

I now see https://github.com/amir20/dozzle/pull/84/files#diff-210c31cd49f34ac9a1fcc99dd77d9030R48. Maybe it makes sense to add that back? I like that you can also filter based on labels. Which will probably make a lot of sense for people.

from dozzle.

amir20 avatar amir20 commented on August 18, 2024

Hmm...It's not possible right now. But I could add it. What's your use case? Is it that important to hide other containers for you?

from dozzle.

adamzero1 avatar adamzero1 commented on August 18, 2024

Thanks for getting back so quick!
I was hoping to use/include this with mdoq the premise being there could be multiple projects on a single server. With the app mounting the docker.sock it can obviously see everything. Which is not ideal, as we need to keep seperation between projects.
It's something I'm happy to add and create a PR for, if you could provide some build steps so I can test locally before creating the PR?

from dozzle.

amir20 avatar amir20 commented on August 18, 2024

Nice. That would be a good addition to mdoq.

It would be really nice to get a PR. I am really busy at work so won't have much time to work on this until next week. But I can review and merge.

Here are some things that might get you going with building Dozzle:

  1. Install nodejs v12
  2. Install go v1.12.7
  3. Install packr globally by doing go get -u github.com/gobuffalo/packr/packr outside for dozzle
  4. npm i to install node mods
  5. You can look at the automated build file script to understand how I build everything.
  6. npm start should automatically do go mod download and start dozzle at port localhost:8080

Here is what you would need to change:

  1. Add a new string flag that can be configure the regex (or whatever you decide to do) at https://github.com/amir20/dozzle/blob/master/main.go#L38
  2. Possibly add the logic at https://github.com/amir20/dozzle/blob/master/main.go#L135 to filter based on the flag.
  3. If it's important, then you would need to also update https://github.com/amir20/dozzle/blob/master/main.go#L148 to not allow logs of filtered docker images

I hope this helps. Let me know if you have any questions.

from dozzle.

adamzero1 avatar adamzero1 commented on August 18, 2024

Nice one, PR raised

from dozzle.

amir20 avatar amir20 commented on August 18, 2024

Should be fixed in #85

from dozzle.

amir20 avatar amir20 commented on August 18, 2024

@adamzero1 Released v1.12 can you try it out?

from dozzle.

adamzero1 avatar adamzero1 commented on August 18, 2024

@amir20 looks to be working

version: "3"
services:
  dozzle:
    container_name: dozzle
    image: amir20/dozzle:latest
    environment:
      - DOZZLE_CONTAINERRESTRICTIONS=6893-.*
      - DOZZLE_TAILSIZE=100
      - DOZZLE_FILTERNAME=6893-.*
    volumes:
      - /var/run/docker.sock:/var/run/docker.sock
    ports:
      - 9999:8080

Only issue is we have now lost the ability to pass in any other kind of filter. We are forced to filter on name. I had thought you wanted it more generic. where you could pass in something like:

DOZZLE_FILTERNAME=name=6893-.*

It still works for what I need though, nice one!

from dozzle.

amir20 avatar amir20 commented on August 18, 2024

Ah I see. Did you have that in your PR? I may have not pulled the latest. Sorry if I missed it. I looked at the filters and it seemed like name would be the most common since it won't change.

On a plus a side, you don't need *. You should just be able to do foo which will work just like .*foo.*. That was the nice part of using the docker API directly.

from dozzle.

amir20 avatar amir20 commented on August 18, 2024

@adamzero1 I added this back in #87.

from dozzle.

adamzero1 avatar adamzero1 commented on August 18, 2024

Sorry have had a hectic few days, yeah opening up so it wasn't name filter specific would be better overall I feel.

from dozzle.

amir20 avatar amir20 commented on August 18, 2024

No worries. Sounds good. The feature should be deployed now. Thanks for your help and PR. It was an interesting feature I hadn't thought of.

from dozzle.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.