Coder Social home page Coder Social logo

Comments (11)

EdwinVW avatar EdwinVW commented on May 30, 2024

As long as it also still works on a Windows machine, I'm fine with that.
Just to be clear: what's exactly the issue with the folder's ownership changing?

from dapr-workshop.

mthmulders avatar mthmulders commented on May 30, 2024

The ownership of the folder changes to 1883, which is most likely not the user id of the person doing the workshop. So they have a folder in their home directory that they cannot write to anymore - the only way to change that is to sudo chown -R ...... it. It's not an irreversible problem, it's just not that clean :-). And people might be surprised (like I was) or even upset that following the workshop brings up this situation.

from dapr-workshop.

mthmulders avatar mthmulders commented on May 30, 2024

⚠️ This is potentially disastrous! ⚠️

The other day, I incidentally ran the Windows command on a Linux machine, and I almost destroyed my setup.

The Windows command is docker run -d -p 1883:1883 -p 9001:9001 -v $pwd/:/mosquitto/config/ --name dtc-mosquitto eclipse-mosquitto - as $pwd is usually an empty string on Linux, it will map the root directory of the machine as /mosquitto/config/ in the container.

The container then changes ownership of /mosquitto/config/ to 1883:1883. On Linux, it will take a while to do this, but it will eventually render the system unusable, as all files are owned by a non-existing user.

@EdwinVW, is there another way to get the current working directory on Windows? On Linux, we can do pwd or $(pwd). There are probably some differences that I'm not aware of, but they roughly do the same...

from dapr-workshop.

EdwinVW avatar EdwinVW commented on May 30, 2024

I'll look into whether there's another way on Windows.

from dapr-workshop.

EdwinVW avatar EdwinVW commented on May 30, 2024

We could also add instructions on how to bake the config file into a Docker container image (using COPY) and use that for the workshop.

Would that not fix all issues (also the chmod stuff)??

from dapr-workshop.

mthmulders avatar mthmulders commented on May 30, 2024

That's exactly what my line of thought was...:

Would you be accepting a PR that addresses this, e.g. by copying over the configuration files to a temporary directory and then mounting that one into the Mosquitto container?

So yes, sounds like a brilliant plan to me :-)

from dapr-workshop.

EdwinVW avatar EdwinVW commented on May 30, 2024

Yes, that was your suggestions but that's not what I mean.

I mean not mounting any folder when starting the container at all, but actually creating our own Mosquitto Docker image (based on the current one). We can than copy the config into the right folder inside the image. We than start the Mosquitto container from our own image. I'm already working on a Docker file for that.

from dapr-workshop.

mthmulders avatar mthmulders commented on May 30, 2024

Apologies for not reading carefully enough. But yeah, copying the config into the container rather than mounting it would also work fine.

from dapr-workshop.

EdwinVW avatar EdwinVW commented on May 30, 2024

I have a working solution now. I will do a PR in which I update the way Mosquitto is used, and also update the instructions for .NET and Java so they comply with the updated approach.

from dapr-workshop.

EdwinVW avatar EdwinVW commented on May 30, 2024

Fix is in PR #31.

@mthmulders Could you please review.

from dapr-workshop.

EdwinVW avatar EdwinVW commented on May 30, 2024

I just executed assignment 6 for .NET and everything worked as expected.

from dapr-workshop.

Related Issues (17)

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.